Jun 29 2010

Patching Virtual Machines Tip

To manage our virtual machines we use Virtual Machine Manager 2008 R2.

I have trouble logging into my VM after doing just a couple reverts to checkpoints. The machine drops trusts to the domain, so it won’t let me log in with my domain account, boo.

Here’s how to avoid it. Thanks, Kevin.


For these steps, log in with a local administrator account:

Step 1

Set the registry key below:
HKEY_LOCAL_MACHINES\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters DisablePasswordChange REG_DWORD 1
(Reboot and add new Checkpoint A)

Step 2

Rejoin the domain
(Reboot and add new Checkpoint B)

Step 3

Run all the important Windows Updates
(Reboot and add Checkpoint C)

Step 4: Remove Checkpoints A and B


(I hate patching virtual machines…)


Feb 26 2010

Martin Fowler, a Software Development Soothsayer

What Agile really means to the future of software development
Martin will call upon his more than 20 years of software industry experience to talk about how the history of the software also serves as a roadmap for what to expect in the future.

Martin had three very drastically different mini talks rather than a single long presentation. I really liked this approach since it helped keep my short attention span.

I. Continuous Integration and Continuous Deployment
His presentation comparing Feature Branching and Continuous Integration was just a regurjitation from his older articles, discussions from other presenters at other events, and a book he recommended by Paul M. Duvall. I won’t bore you with it.

Something that caught my eye was Continuous Deployment and what he called the “build pipeline.” He had an awesome flowchart/diagram to explain this, but I’ll try and do it with a list. I’ll include the tools I currently use in our development environment at work, if they apply.

  • Commit Task – usually kicks off a full build of the main stream on a build server, not a local machine
    • Compile: Visual Studio
    • Tests: NUnit
    • Assemble: NAnt
    • Code Analysis: NCover and FxCop
  • Artifact Repository – this can be a file share to maintain each build version from the Commit task above
    • Binaries: CruiseControl.NET
    • Reports: NUnit, NCover, and FxCop
    • Metadata: I have no idea what this is, any ideas?
  • Acceptance Task – of a specific version in the Artifact Repository
    • Configure Environment
    • Deploy Binaries
    • Smoke Test
    • Acceptance Tests (customer focused)
  • Performance Task – of a specific version in the Artifact Repository
    • Configure Environment
    • Deploy Binaries
    • Smoke Test
    • Performance Tests
  • Deploy Task – of a specific version in the Artifact Repository
    • Configure Environment
    • Deploy Binaries
    • Smoke Test
    • Run

I’ve got the Commit Task and Artifact Repository down to a science at my job and it’s a good reassurance that I’m doing this right! I’m going to see what it’s going to take to get the rest of the “build pipeline” implemented. I’ll also see if Cruise is something that will work for us.

I already have so many books I’ve started reading and not finished, but Martin recommended another interesting one that’s still classified as a “Rough Cut”: Continuous Delivery by Dave Farley & Jez Humble.

II. Domain Specific Languages
I forgot my Hydrocodone in the car and my right-bottom part of my mouth was throbbing. The last time I took a pill was lunch and it’s been the longest stretch. I was a little distracted by that, so sorry for the significantly reduced notes.

Martin had an awesome explanation (in his book) about how to get from code configuration to XML configuration and then finally to a DSL configuration represented in Ruby. SO CLEAN! I really need to finish reading my books instead of starting new ones.

“XML is like violence. If it’s not working, you’re not using enough.”

Martin as also quite impressed about the possibilities of DSLs and the impact of Language Workbenches. He recommended us to watch this video from Intentional Software.

“If you try to solve a problem with regular expressions, you end up with two problems”

III. Controversial Topic: Diversity, Women & African American in Software Development
Although there were no slides, I didn’t really like this talk and I found it quite inappropriate. It is definitely a heated topic and should be discussed, but I don’t think this is the right forum. I’ll leave this topic alone.


Nov 23 2009

Deny Yourself Access to a Domain Name.

Well, why the hell would I want to do that?

We’re moving our hosting to a new hosting provider and just to make sure we don’t have any absolute URL paths, we want to blackhole ourselves from that domain.

With some instructions from Kevin, here’s what we did:Add one line:

0.0.0.0 www.securevantage.com securevantage.com

Yeah, that’s it. Now my local machine goes to a blackhole when accessing the domains above. Awesome. Let the testing begin!

Pretty cool stuff. I just need to remember how to remove it after all this, that’s why I really posted this.


Sep 23 2009

Update Version Number in a File.

No, not an AssemblyInfo.cs file, that’s really straightforward. C’mon it’s a task that does what it says, easy.

Something I was trying to do is update the version number in, for all simple purposes, a text file – something that’s not xmlpoke-able. So I have the property ready to go and the file I want to update!

My first thoughts were to use the loadfile to get the file into a property and replace it with the version.

<loadfile file=”some.txt” property=”token-file”>

<filterchain>

<replacetokens>

<token key=”VERSION” value=”${version}” />

</replacetokens>

</filterchain>

</loadfile>

Awesome, just like the sample and it echos out just fine…so now, how do I save my changes? After some digging around, I looked into the filterchain and read up on the copy task.

Seriously, copying a file now has the ability to modify the internals? Does not compute! Maybe copy, then modify. Anyway, its works now, so I can’t really complain anymore besides the hassle of finding the right task to do the job.

<copy file=”some-template.txt” tofile=”some.txt”>

<filterchain>

<replacetokens>

<token key=”VERSION” value=”${version}” />

</replacetokens>

</filterchain>

</copy>

Now I know why James keeps telling me to get out of the XML HELL. Coding tasks in XML is just ass backwards.


Aug 4 2009

Security Auditing SP2 Released

This is a huge milestone for my career as a software developer. Not because I’m finally releasing code for customers to use in production, but I’ve also been able to introduce some new shiny toys to the development team over the past few years. Since the day I started to what we call our “biggest and most complete [release] that we have done to date at Secure Vantage,” we’ve been introduced to a few tools:

  • Source control – Subversion
    • TortoiseSVN
    • VisualSVN/AnkhSVN
  • Continuous Integration – CCNet
    • Build automation
    • Test automation
    • Package automation
  • Bug and Feature Tracker – Mantis
    • Notified using RSS in Outlook

You might be thinking, shouldn’t every successful software development team already have this in place to start with? Well, we didn’t and I made it a point to get it setup before I got too deep into code. Now, some of you might be wondering what we used before, but I’ll leave that to the previous development team to answer that. I joined the team on a green-field development project, most of which is the only C# we have. I was able to introduce new tools in order to help me track my progress and deliver products with confidence. Now, everyone on the development team is onboard with these tools.

As for Subversion since I have a vivid memory of a project in a Software Engineering course: Foozy, Team Foo. The project went very well, it worked during the demo and we had it well documented and even added a CD cover with a picture of everyone on the team. After the demo, we sat down with to discuss our process. I didn’t think of it much at the time, but process, tools, and techniques are king! He asked us what we used for source control and I completely freaked. We passed our code around on a USB stick and in his class we learned about all the source control tools available to us. I pulled the USB stick from my pocket and showed him, this is what we used. He definitely didn’t find it as amusing as I did.

Now, if you don’t know, I took a few courses from Venkat Subramanium, a pretty well known polyglot in the software development world, and I learned a lot about software development, best practices, and even picked up a few books just because of him. Who knew we have such a great asset at the University of Houston? GO COOGS! Anyway, I made it a point to use process, tools, and techniques I learned from his classes for the rest of my software development career.

Since then, and even more so while working at Secure Vantage, I’ve got pretty anal with software development. Especially about doing things the right way versus just getting things done, but it’s hard when we as a team have committed to a delivery date. I just follow that cost-quality-time triangle thing (what’s that called again?) and guess what always gets dropped first. I think I’ve been able to counteract that out with the Pareto Principle. On top of that, in the last few weeks I’ve been able to knock out a lot of those bugs put in the backburner to get where we’re at today. =)

So that’s cool, but what’s next for me? I definitely know I’m nowhere near complete. I’m going to have to start figuring out a way to manage the branching strategy, but I’m reading and hearing about so many different things it’s so overwhelming. For now, I’m just going to try my best and keep things as simple as possible. This is a new frontier for me, and I hope I’m ready for it. I need to get back to reading blogs, articles, and books again. I’ve fallen off that boat for far too long.

Oh, and today is my half-birthday!


Apr 28 2009

MMS 2009: Round Two.

I had the great opportunity to attend the Microsoft Management Summit this year. Unlike last year, this year I’m staying at the Venetian, rather than the MGM.

My experience with this kind of event comes with much hesitance for me. I’m uncomfortable in an environment with a throng of people. Here’s a crazy fact about me: I learned the word “throng” from when I read Scarlet Letter. Many people in this case is about 2,500 people at booths and wandering around trying to sell stuff and ask for advice. It’s a sales thing, but the reason I’m going is for the sessions and to challenge my fears. I’m here to soak in all the information about new features as well as upcoming features for System Center Operations Manager (SCOM) and put myself in front of potential clients or just casual inquirers about our product line.

[Saturday]
I woke up in a mad dash to finish up washing clothes and packing. My flight was at 2:35 PM and I’m running around like crazy to get my things ready. After my last round of dried clothes are laid out on my bed, I make sure I have everything again and just in time to leave the house to head to the airport. I hate being a procrastinator.

Any way, I land, grab a little snack and met up with Kevin to wander around the strip. We picked up some drinks and checked out the Mirage’s new Volcano show. It’s freaking awesome. After little debating, we went to Wolfgang Puck. Everything was just freaking awesome.

Wolfgang Puck. Crab Cakes. Popcorn Shrimp.

[Sunday]

Work day. Enough said. The server room was in the bowels of the Venetian. After finding the command center, we went through a backdoor, downstairs to an elevator. After hopping off, we walked down through what looked like a service hallway. There was a door that required a key and that’s where we were, Floor .5. The Server room. Well after setting up our products to monitor the show’s network, I was eager to find a television to watch the Rockets play. We went to the AquaKnox and I sat myself directly in view of the game, awesome. it was the 4th quarter and all of the sudden everyone is standing up…NO!!! Well, good thing we just walked next door to some restaurant. We made a pitstop at the circle bar which is our typical meeting spot. Lavo was our last it stop for the night and for good reason. Waking up at 8:30 AM was not exciting. Thanks Coffee and Advil. Thanks a million. Yes, we were at half a floor.

[Monday]

I felt really queasy all day, but manageable. Before the Expo opened, we went to Grand Lux Cafe for small bite to eat. I had a small salad and maybe three spoonfuls of soup. Food wasn’t making me happy. The Expo was great, but like I said before this was something completely out of my comfort zone. Talking to wanderers who wanted to know general knowledge was nice, but the most fun was talking to the guys who wanted to know more about the product I actually develop. After the Expo closed, we went off to grab dinner at Pinot Brasserie. I was ready to pass out from hunger. By all means, I took care of the hunger. Surf n Turf!

[Tuesday]
The best session today was “Common Mistakes When Using Operations Manager and How To Avoid Them.” The speaker, Cameron Fuller from Catapult Systems, was very engaging: kudos to him. Tonight was a chill night with the Rockets. Too bad we lost, but its a home game coming up Thursday!

[Wednesday]
Sessions were good, but it seems like some speakers shouldn’t be speakers. I know I’d be horrible at it, so I know I’d never do it. Speakers need to learn to vocalize, hell it’s the most important thing to keep your audience awake. Good material can be presented in a monotone voice and makes it completely a bore. I also found it a little interesting that the speakers who loved to take in questions mid-sentence and interact with the audience to be the most effective. Other speakers who wanted to keep Q&A at the end seemed to be really focused, maybe a little too focused about what they were presenting rather than how the audience was taking it in. Any way, dinner with the company at David Burke was awesome. Thanks, Secure Vantage for taking care of us!

I finally hit the slots, up $30. Thanks to Wheel of Fortune and some random penny slots game I found interesting.

[Thursday]
NEVER have a cappuccino after dinner, EVER. I barely slept and was up at 4:00 AM for no reason. I tried going back to bed, but no success until around 6:00 AM. Today’s session was “Lousy Network Performance: Top 10 reasons the Network is Slow” by Laura Chappell. I’m definitely going to check out the tool she showed off, Wireshark. I’m also going to try it out on our network to see how we perform.

GO ROCKETS! Man, 12 years is a long time…

[Friday]

Last day and flight is at 6:25 PM. There are no shows during the day, so all we did was gamble and watch some sports. I was really glad to finally get out of there before I lost any more money. Bye Vegas.

Nov 17 2008

First Year on the Job.

First Week on the Job | First Month on the Job
(If this ever gets to “First Decade on the Job”, then WLOWL.)

Anyway, it’s been about a year now and things are awesome. I’ve completely changed both as a developer and an employee since I’ve started. I’m hoping for another great year with way more on plate. Consider this an “end of the year review” for myself.

Accomplishments both development (yay) and non-development related (sigh)

Things I Have Learned

  • System Center Operations Manager: what it is and how it is used
  • Subversion: administration rather than just the TortoiseSVN part, still way more to learn on this
  • Creating test users under the domain and using “runas” helps with testing
  • 32-bit Vista will only recognize 3GB of RAM
  • Windows Server 2008 Hyper-V is awesome!
  • Having a laptop dock saves seconds of your life a day
  • I don’t like Silverlight/WPF because of XAML. It’s ugly!
  • NAnt is nice, but MSIs are what the customers want/need
  • A downed Subversion Server on weekends makes for a really painful commit on Monday
  • Outlook does not manage emails well nor make support migrating to new machine fun
  • Sometimes working from home is way more productive
  • Web and Win development has its own gotchas and fails
  • Employers who trust trustworthy employees reap ginormous benefits (I think I’m pretty trustworthy)
  • The grass is ALWAYS greener on the other side of the fence, but you might end up having to landscape it, weed it, edge it. In the end it will become what you make of it.

Things I Would Like (to Learn)

  • Common Design Patterns
  • Enterprise Architecture and Design
  • One experienced C# developer (who enjoys the alt.net initiative) to brain storm and do code reviews.
  • Someone creates MSI Installers for us (I hate them)
  • Daily stand-up meetings with myself (yeah, I’m a lone developer)
  • Subversion Administration (helpful hooks, scripts, and processes)
  • Broadband wifi card (so I can work on the bus or just anywhere)
  • I need formal, hands on agile training from JP, not just reading blogs
  • Remove dependence on a cup of coffee a day

Areas of Improvement end of year reviews always come with this part

  • Provide training for others on Subversion, Mantis, and knowledge sharing
  • Ask for more feedback and detailed requirements
  • Improve on product roadmap knowledge
  • Understand more about customers’ needs and use of products
  • Attend more User Group meetings to learn from others

Something I need to improve on is quality of life. This startup has a lot potential and a lot of things to do, but I need to find something to do outside of this. I have a huge passion for development, but I need to find something to do off the computer. I mean, even my side projects are web-related and I just recently got the Android SDK so I can start making stuff for my brother’s new G1. I’ll need to start jogging again to build up some stamina in preparation for our snowboarding trip in December. I CAN’T WAIT!!!


Oct 15 2008

Code Review FUN!

Legacy code can be fun!
How many wrongs make a right? The more the merrier?

//VB.NET
Public Function ConvertSDToStringSD(ByVal securityDescriptor() As Byte, ByVal securityInfo As Integer) As String
Dim pStringSD As IntPtr
Dim stringSDLen As Integer
Dim success As Boolean = ConvertSecurityDescriptorToStringSecurityDescriptor(securityDescriptor, 1, securityInfo, pStringSD, stringSDLen)
‘ The following ensures that the memory allocated to pStringSD by the unmanaged
‘ Win32 API is freed.
Try
If Not success Then
Throw New System.ComponentModel.Win32Exception(Marshal.GetLastWin32Error)

End If
Return Marshal.PtrToStringAuto(pStringSD, stringSDLen)

Finally

If (pStringSD IntPtr.Zero) Then
Marshal.FreeHGlobal(pStringSD)

End If
pStringSD = IntPtr.Zero

End Try

End Function

TOM ANGRY, can you guess why?


Jul 15 2008

Secure Vantage Technologies is Hiring.

Shh, keep it on the hush-hush. We’re not posting this public on our website, but I’ll put the positions and basic requirements here. If you are interested (or know someone who is interested) on the complete details, please email me: tnguyen [at] securevantage [dot] com.

Principal/Senior .NET Developer (Houston, TX)
-Windows Forms, GUI, backend, Client-Server, WPF, Silverlight

Principal/Senior Report Developer (Longmont, CO)
-Reporting Server and SQL Server 2000, 2005, 2008 experience


Jul 3 2008

System.OverflowException!!!

This is the first time in my life I’ve actually run into an OverflowException when converting a string value to C#’s Int32. It’s time to upgrade and beef up the application to handle Int64 in certain scenarios. Time to play with the big boys.

The max value for an Int32 is 2,147,483,647.
The max value for an Int64 is 9,223,372,036,854,775,807.

Here’s my Event Log:

Event Type: Error
Event Source: Secure Vantage Audit Collection Admin
Event Category: None
Event ID: 0
Date: 7/3/2008
Time: 1:39:23 PM
User: N/A
Computer: CLEAN-OPSMGR
Description:
Could not update AuditCollectionAdminServices.

System.OverflowException: Value was either too large or too small for an Int32.
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ToInt32(Object value)
at SecureVantage.OpsMgr.Consoles.Services.AuditCollectionAdmin.DataAccess. AdtAdminData.GetStats() in C:\apps\opsmgr-consoles_BUILD_0.2_Beta\src\Services.AuditCollectionAdmin\DataAccess\AdtAdminData.cs:line 66

So what the hell is Audit Collection Admin Services? It’s a BETA product I’m currently fine tuning for SecureVantage. WHOOOHOOO!