Wednesday, December 29, 2010

Support Rosetta Code

For all you hobbyist or professional developers out there who have not heard of Rosetta Code, it is a Wikipedia of sorts for programming tasks solved with a plethora of different languages (452 and counting, I believe) -- and they need your support to keep it alive!

Visit their Finances Page to see how you may be able to help (yes, they take PayPal donations). It'd be an absolute shame to see this growing and useful resource go under.

Tuesday, December 28, 2010

The Best Teaching Programming Language?

I ran across an article today that attempts to explain the merits of using BASIC as a teaching programming language. While the author makes some valid points, specifically at the simplicity of BASIC, I believe that BASIC is a bit of an archaic language that should probably not be considered as a teaching language. I believe learning this language would espouse some bad habits (GOTO, GOSUB nightmares inherent in BASIC) and would promote design concepts that wouldn't have any application in the real world.

In terms of context, I was trying to think of what would stir someone to pursue programming as a hobby and potential career path. Sure, the very fundamental idea of programming is to send instructions for your computer to execute, but why would someone (assuming in younger generations) pursue this seemingly droll craft?

Thinking back on my younger days as a script kid/amateur hacker, what really appealed to me initially was actually videogames. I was astounded at the "black art" of sending instructions understood by a computer that somehow turned into the gaming experiences I loved as a child. Of course, over time, my interest eventually evolved to my current interest in data driven applications, but what really hooked me first was definitely the flashiness that could be achieved in programming in videogames.

That being said, I tried to think of what language out there would be the best teaching language for someone of my demographic when I was younger -- a language that would be readily accessible, relatively easy to pick up, and a person could steadily expand his/her skills through a learning process. Also, the ability to do some flashy things wouldn't hurt; let's face it, at the end of the day, a programmer would like to see something with a little pizazz versus some boring command line outputs.

Taking these factors into account, if I were younger today, I'd probably want to pick up Java as my first language. The learning curve of object-oriented design may be a turn off for beginners, but you can certainly use Java without having the full knowledge of OOD (though the architecture inherently will drive you to understand it). It is:
  • A free, readily available platform
  • All the basic OOD goodies like polymorphism, inheritance, and recursion for advanced learners
  • Type safety, i.e., an integer is an integer, a String is a String, etc (some schools of thought consider type safety to be a hindrance -- I am still a believer in it)
  • A huge community from which to absorb knowledge
  • Multiple platforms for development -- Java 2 SE, J2EE, Android, etc
Some may say that Java may be too formidable a platform on which to start, but I feel that the wealth of resources available for one to learn Java, coupled with the strong community and great tools that aid in learning would make Java the best candidate for a teaching programming language.

So, what about the aforementioned flashiness that will hook certain people? Java's got tools for that too. Specifically, I still remember an intermediate Java class in college that I thought would've helped drive the concepts of OOD home for a lot of students in a high school programming course. We used a great Java application called RoboCode as our course-long project. The final exam? Having all of our classmates' robots go at it in a battle royale on the last day.

Certainly beats solving abstract problems and was more educational if you ask me.

Wednesday, December 15, 2010

Philly Sports: The Four Horsemen Assembled

Great day to be a Phillies fan today. In a little over 45 minutes, Cliff Lee comes home to Philly! Not sure to whom I should give credit for the Photoshop below, but whoever you are, well done.



Multiple VSS Projects Using Cruise Control .Net

I'm a big fan of Cruise Control .Net. As an open source continuous integration server, it performs wonderfully and is quite scalable.

Unfortunately, great CI servers can often times be matched with horrendous source control systems. Specifically, the bane of all SCM's, Visual SourceSafe 6.0. My group at work unfortunately is still encumbered by VSS 6.0 for a little while longer until we finally migrate to a proper SCM in 2011. Subversion or Git obviously would get my first vote....but, I digress...

I ran into a little hiccup with VSS on Cruise Control .Net -- some of my assemblies are located in different project locations. I needed to update multiple projects on different locations in the SCM prior to executing the build.

So, how does one properly update multiple projects in VSS for a Cruise Control .Net build? Digging into the CC .Net documentation further, I found that there is an option for a "multi" sourcecontrol block in your ccnet.config file. Using the multi type sourcecontrol block, one can call for multiple updates to different projects on VSS.


Example:



<sourcecontrol type="multi">
<sourceControls>
<vss>
<executable>C:\Program Files\Microsoft Visual Studio\Common\VSS\win32\ss.exe</executable>
<project>$/SampleApplication</project>
<username>VSSUser</username>
<password>VSSPassword</password>
<ssdir>\\SERVERNAME\VSS</ssdir>
<workingDirectory>c:\VSS\SampleApplication</workingDirectory>
<culture>en-US</culture>
<cleanCopy>false</cleanCopy>
</vss>
<vss>
<executable>C:\Program Files\Microsoft Visual Studio\Common\VSS\win32\ss.exe</executable>
<project>$/SampleApplication2</project>
<username>VSSUser</username>
<password>VSSPassword</password>
<ssdir>\\SERVERNAME\VSS</ssdir>
<workingDirectory>c:\VSS\SampleApplication2</workingDirectory>
<culture>en-US</culture>
<cleanCopy>false</cleanCopy>
</vss>
</sourceControls>
</sourcecontrol>

In essence, you are instructing CC .Net to make multiple calls to the SCM (VSS in this case) to grab all pertinent source code prior to your build. This example would obviously also work for other SCM's compatible with CC .Net, such as Subversion.

Sunday, December 12, 2010

Laptop Keyboard Ergonomics

The design and feel of laptop keyboards always seemed very similar across the board in my experience. However, there were/are exceptions to this rule. To me, the ultimate laptop keyboard was that of my old IBM Thinkpad T22. The keys were perfectly spaced and the ancillary functions were so easy to figure out, I could turn down my laptop speaker's volume, turn on the keyboard LED, and put the machine on hibernate with my eyes closed. After that laptop, all other keyboards seemed very inadequate to me.


I'm pleased to say that my new laptop, the Lenovo IdeaPad Z565, has a keyboard that will make my yearning for my old T22 keyboard go away. As you can see from the image on the right, Lenovo opted to go with the "chiclet layout" that's become vogue with laptop these days thanks to the MacBooks. I'm definitely a bigger fan of this assembly versus the interconnected keys that would inevitably pop off when my cat decides to use my laptop as a butt heater. Beyond the assembly, you can see that the laptop's size affords it the ability to actually have a relatively full-sized keyboard complete with numeric pad. It took about a day to get used to NOT crunching my hands together to adhere to a small layout. Now that I have gotten accustomed to having a full-sized keyboard on a laptop, I don't think I'll ever be able to go back to the old standard laptop keyboards.

Saturday, December 11, 2010

Windows 7 and Backwards Compatibility With Older Routers

So, after much delay, I've finally obtained a more up-to-date laptop. My Vaio from 2007 was really showing its age, so I desperately needed a more powerful machine for proper development work. I decided on the Lenovo Ideapad Z565 -- for the price, I really couldn't turn it down. This machine runs Windows 7 Home Premium 64-bit out of the box.

Slight bit of a wrinkle this laptop caused, however, was in my home network. I have a bit of an older wireless router in the D-Link WBR 2310 -- nothing fancy, just a standard Wireless G router from 2006. As soon as I hooked up the new laptop to the network, either via WiFi or Ethernet cable, the router would go on a freeze and reboot cycle. Baffled, I at first figured that I might need to disable IPv6 on my wireless and local area connections, but I still exhibited the same symptoms.

After reading up on a few forums, it appears that Windows 7 has some backwards compatibility issues with older routers with regards to uPnP. Without boring you with the details, the fix was to disable uPnP on the router. So, if you own an older router and hooked up a Win7 machine to it, and it exhibits the freeze and reboot cycle listed above, this may do the trick.

I'm not sure if this is a backwards compatibility issue with Win7's network protocols or just a better firmware update needed for the WBR 2310, but I'd say that's a heck of a bug either on the router or OS side. Even the laest firmware update on the router didn't help, and I had to manually flip uPnP off -- not a big deal, but for a non-technical user, I'd imagine this to be a baffling bug.