Are you a Programmer or Developer?

This is definitely an article any programmer/developer should read. I found this article a few days ago on OSNews.com. In it the author speaks to the wide variety of differences between a developer and programmer, two words that many people (myself included) use interchangeably. But, in fact, their are quite a few difference between the two as outlined by the article. As I read I started wondering which category I fell into, so I will go section by section and examine myself based on that section.

I had the great experience of working for a company last year while taking a Software Engineering class at my local University. It was an eye opening class as to what actually goes into making a software product correctly. As I then learned at the business that these process are often shortcut ted (at least in this case) and their is no formal method for doing the application. I always felt this was a weakness of the company, however, I was determined to follow what I was learning in class. Gathering requirements was quite difficult as I was one with very little experience, but I recognized that this was good experience to gain.

I always find it difficult to gain information about the business because I do still have that programmer mentality that doesn’t want to learn about things outside coding. I realize this is a bad mindset to have, but I think its natural to most CS grads as we know coding as that is what we do in College, for the most part.

I remember how amazed at how easy PHP was to pick up and the super cool things I could do. I am more experience and educated now, and far more analytical and spare no feeling for criticizing the tools I use or the solutions I think of. If someone asks me how to solve a problem I even analyze the answer I give them to better my mindset. When my friend Adam (http://www.threadbox.net) mentioned Rails to me a few months ago, I had been hearing about Rails for some time, and decided to give it a try. I was immediately impressed by the ease of which creating a basic Data Driven application was, and how much was done for me automatically. But being the now cautious mind I have become, I could see holes in this marketing facet. What is going on under the hood, whats the availability, how well does it integrate with existing tools like Apache. Anything can be written for one tool set, what determines real value is the extensibility of using it with other tool sets and components. This is one of the reason I like Microsoft’s approach to Ajax over Rails, but that’s another topic.

I will honestly say, I save the playing and the fun stuff for personal projects, I normally clear such things with those above me and around me so that we can remain on the same page. Documentation is important, and I have taken to forcing myself to document (.NET makes this very easy) even my personal projects as if I was doing it for a company. Perhaps the biggest example of Programmer vs. Developer in the modern programming environment is the constant talk about Ajax.

I will only say this about Ajax, as an in depth discussion is outside what I am talking about. The reliance on a particular non-standard technology is fine for any personal non-commercial applications, but this should be a well discussed topic for commercial apps.

Perhaps the most important point this article makes is that programmers like to play whereas developers like to work. I think this is true on the whole. Based on the many conversations I have had with my peers as well as my own tendencies, I like to play when I code. But this feeling is slowly diminishing as I continually enhance my programming skills through practice and reading. However, I think its bad for it to completely be gone, a developer/programming should enjoy coding. However, it is important that interest is developed outside the coding realm as, properly managed software products, are not so much about coding as they are about planning. This concept is the focus of a major problem I have with my University, as I feel they do not underline this principle strongly enough in the various CS classes I have taken. Due to this, test-driven development (and formal testing models in general) was/were quite foreign to me when I took up my first software development intern position.

I am still guilty of not following strict testing procedures when I program on my own. I do tend to test most major changes as I go along, but bugs always crop up in the end. Though, I admit that my planning process (if any) is ad-hoc at best for these personal applications. It is something I am learning, as a year ago I rarely ever planned out what I was going to do. This often resulted in me taking longer to complete a project that I felt it should, so I began to put more emphasis on understanding the program before I tackled it and not doing everything in my head. Rather hard for a programmer, as this is the way we generally do things all through college, were our homework assignments tend to be very simple and less involved then most commercial applications.

It also tends to be the case that students of programming want to “impress” their friends by doing something a certain way to show they can. While this works great for personal and academic programs, its hardly ideal in a business situation where proper development procedures demands following standards and guidelines. It is acceptable, for example, to often tackle a program any way you wish in the classroom as professors generally dont grade on efficiency but rather implementation (though my better CS teachers have made comments on how I can make my code better).

One of my complaints about my CS education is that the idea of Patterns were introduced far too late. In my mind this is something that should be introduced just past the introductory class level before most of the students become firmly ingrained in programming a certain way. Programmers are no different then any other person in that once they become accustomed to doing things a certain way, they will want to continue to do it that way because its familiar. This is also the reason a lot of students feel that what they learn in the classroom is sufficient in the real world.

In reality, a developer is something a programmer becomes by keeping an open mind and exercising temperance and objectivity with new technologies and methodologies. I made the mistake of writing the website for our Computing Honors Society chapter in .NET because it was cool. I later regretted this as I came to find that I didn’t know enough about the framework (or at least nearly as much as I know now) to properly implement the solution so others could easily understand what I did. As a result, the website was scrapped and is set to be rewritten by the next Chapter taking office in November. I considered this an embarrassment. This also one of the reason behind the lengthy development time for my website, I have had to make revisions as I learn more about .NET.

This is, a good experience, I feel because it makes me think twice about taking a new technology and implementing it without doing proper research. Now, when I speak about frameworks and technologies I always keep in mind what has been proven and what is not proven. I have concluded, that most modern frameworks are simply too complex and provide too much depth to really use them to learn and develop and effective and maintainable application at the same time. My current website is much closer to a well written application then its earlier versions. With .NET and Rails I feel the best measure of how well your using the framework is how little code you have to right, as most of what you want can be done for you.

But in the end, the applications maintainability and effectiveness is determined by developers who put forth the time and the effort to properly plan and design an application. A developer properly researches a new technology product and determines how to use it effectively before considering its use in a commercial product. That is the biggest difference between programmer and developer. In my case, I am still a programmer, though I am a lot closer to a developer then I was a year ago. But as a developer is something a programmer becomes, its also necessary to have experience as a programmer to become an effective developer. By learning from ones design mistakes and learning the proper way of using the tools at your disposal to effectively develop software is truly the best means to become a developer; not much different from real life.

Internet Explorer 7 and Toolbars

For whatever reason people find pleasure in developing things like toolbars and then forcing users to put them on their computers. With so many people running MSIE, developers had a fairly easy time “drive-by installing” these apps. As a result, I have met my fair share of Windows machines riddled with spyware and overloaded with toolbars. Generally I tell the person to get Firefox and never use IE. That was until IE7. I have known, because I have been using it, that IE7 is a great step for Microsoft even when running it on XP without a lot of the Security modes available on Vista. I have been curious, to some degree, how it runs on Vista and what they new security is like.

This article was recently published on OSNews.com and it shows the immense difficulty in installing these annoying toolbars on IE7 under Vista. After reading this article and wondering why ANYONE in their right mind would install 17 toolbars in IE7, especially considering the amount of work involved in actually installing them, I began to doubt the authors sanity. But he was able, at the end of the article, to, with just a few clicks, restore IE7 to a near pristine state. I say “near” because the Yahoo toolbar remained, not quite an annoyance, but one wonders if other developers will follow this method and not allow IE7 to reset their toolbars.

I dont doubt that people will find a way around any type of protection that is installed in a system. This is just how software development is, it is very hard, if not impossible, to create a completely bug free unexploitable program. In particular with Microsoft and the high market percentage they own, it will happen. Microsoft can only do so much to make sure users dont shoot themselves in the foot. The only other option is to not allow the installation of software, and thats not really useful and would in fact make the OS useless.

You can, of course, also say “Well if Linux is immune to spyware, why cant Microsoft follow suit?” I dont know the answer to that question, I have my thoughts, but nothing concrete. I can tell you its likely to do with the ridiculiously small market share Linux has in comparison to Microsoft. Or the fact that many people who run Linux are quite knowledegable about Malware and Spyware. I, for one, have never had any problems with IE and Spyware on my computer, but then I am not the typical Microsoft Windows user. Thus, most people running Linux would tend to know what they are installing and whether they actually want it or not. Also, I know that Linux does not allow the browser to run as Microsoft has IE run in XP, which allows it access to the system in such a way that it can install software. IE7 changes this; this change should improve security drastically for IE and not allow malicious programs access to the system where they could do their evil deeds. But the button line is, no matter how good a wall you build if the person watching the wall is an idiot, its just as secure as not having a wall at all. The same is true about users and computer security.

The one thing in this article that did bug me, and bugged the author as well, was the presence of a bug that could possible do a lot to undermine Microsofts attempts at security. In order to install these programs you must lighten the security provided to you by Vista and IE7 as these programs require use of Windows outside what IE7 has access to. ( If you dont understand this, do some reading about how IE7 runs in Protected Mode by default. ) The problem is that when IE7 does drop the Vista security by installing one of these programs, it stays down. With it down, IE7 will still ask you about installing this software, but it is by no means as difficult as it is with Protected Mode On. Hopefully, Microsoft will fix this in the final release.

So, overall, my thoughts about IE7 have not been wrong. The emergence of Firefox as a worthy competitor to MS has given the company reason to really ramp up Internet Explorer and has shown that Microsoft is capable of putting out a decent browser. I have been using IE7 here and there for a couple of months, and so far I am quite impressed. I do still use Firefox more, just because I like the UI and all the little features (like the Find and Firebug) that make my life easier. But I think that IE7 is a huge step in the right direction and will certainly help make sure I dont have to go home every other week to clean spyware off my parents computer.

Privacy and my Soda

The Article

I read an article recently on the newly forged agreement between the EU and the United States with regard to the sharing of passenger data. Now, in my opinion, I think a lot people worry way too much about privacy and the keeping of sensitive data, I am not saying that their worry is unjustified. In reality, one should worry about this data and who sees it; ideally people should trust their government with such things.

But we do not live in an ideal world, very few people trust their governments, and why should they with all the corruption and stupidity that happens. Take for example, Bill Clinton cheating on his wife with an intern, an ugly intern, but an intern nonetheless. Or the recent case in of Senator Foley being involved in inappropriate conversations with male pages on his staff. Again, I am baffled, as always, by person’s conducting questionable activities with underage person’s, but then again I am quite right in the head.

The point is that because people dont trust governments, they are much more resistant to giving up their privacy data; even in the interest of security. The article speaks to the immense amount of legalities that had to go into the US and EU Passenger Privacy Agreement. In particular, the EU Privacy watch groups and the American Civil Liberties Union expressing their disappointment in the EU’s inability to stand up to the US in this case.

I can see where the US is coming from. As a friend said to me a few months ago. “With all the new security regulations ( shoe checks, no liquids on the plane, and being frisked ) one could say the terrorists are winning.” In a sense I agree with him, their actions certainly are making things difficult for travelers; try spending 14 hours on a plane with nothing but the pop served on the plane. The fact is, you could make a bomb out of anything, a laptop battery, a cellphone. So what happens when a terrorists rigs there cellphone to blow on a plane, will the US disallow cellphones on planes, imagine the riots that would cause in the business community.

In my opinion, the best way to protect travelers is to know as much as possible about whose are traveling. This of course involves the collection of data, usually sensitive data, to get an idea about a person’s background. This also involves profiling, which many watch groups in the US have cried about discrimination. However, the fact is that profiling is a very efficient means of picking out suspicious persons, though its by no means perfect. However, I would rather have people upset over being profiled then being told I cant take my cell phone or laptop on a plane.

In my opinion, I dont worry about what data the government is collecting about me, or how it will be used. If they abuse it, then there isn’t much I can do about it anyway, as they would find a way to get the information regardless. For example, the article mentions that the US was prepared to deny American bound aircraft access to their airspace if an agreement was not reached. Some may call that overstepping the bounds, others would say the US is doing what it takes to ensure the protection of its travelers. As for me, if they want my data they can have it, thus far no harm has come and as long as it keeps going I wont care. But other people are more cautious, smarter perhaps, and that is their decision and that is a right granted to all persons.

However, it is clear that the threat of terrorism is not going away. Some may say that if we pull out of the Middle East no more terrorist attacks will come, perhaps their is some truth to that. Personally, I dont buy it, but that is a topic for another post at another time. But people need to ask themselves would they rather give up some privacy information or not take a soda on a plane.

Using Ruby on Rails Sortable List

For an application I am developing I wanted to allow for the position of various items to be drag and drop changeable via Ajax calls. So I started looking around the internet for Ruby on Rails examples doing this as I remembered seeing examples on the internet. I found this website: script.aculo.us – web 2.0 javascript demos This article provided me with a good foundation for taking a crack at this.

So the first thing I want to show is the code in the episodes Model:
class Episode < ActiveRecord::Base
belongs_to
:season
belongs_to :episode_type
belongs_to :format
belongs_to :genre
belongs_to :group

acts_as_list :column => :number, :scope => ‘season_id = #{season_id} AND episode_type_id = #{episode_type_id}’

validates_presence_of :name, :message => ” cannot be blank”
validates_numericality_of :duration, :number, :parts, :size, :only_integer => true, :message => ” must be a number”

end

The line to focus on is that which is in green. The acts_as_list function is a neat little function that effectively gives every episode List like functionality. A list of those methods is available here:
http://rubyonrails.org/api/classes/ActiveRecord/Acts/List/InstanceMethods.html

So this automates the database functions to properly update the list, and I tell it that the column that determines the order is the :number column, I also define a strict scope so that even if a Season has movies associated with it, those movies are seperated from the episodes and of course I only want Episodes from the same season.

Now moving on to what you all are waiting for, here is some code from the Anime Manager that uses the sortable_element function. In this version I have stripped a lot of my filtering so it just print out every entry associated with a season, this array is generated in the controller per the MVC model.

<ul id=“episodes”>

<li id=“item_”>#


<%= sortable_element ‘episodes’,
:update => ‘episodes’,
:url => { :controller => “admin”, :action => “order” }
%>

Notice the areas I have colored red, note how they match. This is required, the first parameter of sortable_element is the id of the list we are making sortable. In the next section Ill show you how to have more then one sortable list on a page. The next thing to look at it is the value of the :update parameter in the sortable_element function. As is appropriate in UI development it is often nessecary to define the area to put a message to determine whether the operation was successful. This can be any element on the HTML page, in this case I have it pointing back to the same block that its monitoring. The reason for this is that in my code, I update the list as a whole to reflect the new order of the that list.

We could modify the call to sortable_element function like below to show an effect on once the operation has been completed. You will recognize this from the code above:
<%= sortable_element ‘episodes’,
:update => ‘episodes’,
:complete => visual_effect( :highlight, “episodes” ),
:url => { :controller => “admin”, :action => “order” }
%>

Here upon completion we add a visual_effect that highlights the designated block of HTML on the page. Once again I have it pointing at the episodes list, but it could be any element you want with an id.

Now lets say in addition to a OnComplete effect you also want to give the user some means of knowing that the operation is preceeding. Well as with all Ajax effect in Rails you can use the :loading parameter to provide some visual effect to show activity. I tend to prefer the user of a spinner control, so we’ll modify the code a little.

<ul id=“episodes”>

<li id=“item_”>
#

<span id=“progress” style=“display: none;”>
<%= image_tag “spinner-blue.gif” %> Updating List – Please Wait


<%= sortable_element ‘episodes’,
:update => ‘episodes’,
:loading => “Element.show( ‘progress’ )”,
:complete => visual_effect( :highlight, “episodes” ),
:url => { :controller => “admin”, :action => “order” }
%>

So what this will do is when you move a list element it will make a call to the server to perform the indicated action. And at the same time Client Side Javascript will set the display of the ‘progress’ div tag to “”, effectively showing it. Then once the Ajax call is complete the desired HTML block will be highlighted to notify the user the server has completed its task. However, their is a problem here.

We only want to show the Progress DIV to the user when an operation is occuring. Otherwise we would be telling the to ‘Please Wait’ all the time after one list move, not good UI design. So how can we have two effects on completion. Well its really quite easy, we use a hash. Below is the code, that also hides the progress DIV once the operation completes, note the syntax:

<%= sortable_element ‘episodes’,
:update => ‘episodes’,
:loading => “Element.show( ‘progress’ )”,
:complete => { visual_effect( :highlight, “episodes” ),
“Element.hide( ‘progress’ )” },
:url => { :controller => “admin”, :action => “order” }
%>

Its that easy!!! And just by looking at that you can understand how to make multiple JS calls for each Ajax event. But I caution you not to go overboard as a website that shows 80 Please Wait messages is not a website with a good UI.

Thats really all there is to it, there are more options for sortable_element so I recommend reading up on exactly what the function can offer you and your web application. I hope this tutorial was helpful.

Windows Server Core Thoughts

http://www.redmondmag.com/features/article.asp?EditorialsID=640

I recently read this article from Redmond Magazine and, ignoring the clear bias towards Microsoft, I put my objectivity to the test to read about a new version of Windows, shipping along side Vista, called Server core. Based on the reading this is a tremendous shift in idea for Microsoft. As the company that, for the most part, defined the Consumer Desktop Experience, to seemingly take a step in the Linux direction and create an OS that is “bare bones”, in fact reading the article I was reminded very clearly of the old days of DOS.

“Server Core can only act as a file server, domain controller, DNS server or DHCP server. As such, it’s far from being a full-fledged Windows operating system (although Microsoft is considering other roles for future versions). Besides these four core roles, Server Core also supports Cluster Server, Network Load Balancing, the Unix subsystem, the new Windows Backup in Longhorn, Multipath I/O, Removable Storage Management, BitLocker drive encryption and SNMP. Server Core also supports Remote Desktop administration, although you’ll only get a command-line window when you connect. “

“That’s about it. There’s no Internet Explorer, no Outlook Express, Calculator or Windows Paint, no Wordpad, Windows Messenger or Media Player — just the basics. Microsoft did add Windows Notepad to Server Core at the request of several sneak-preview customers, but even that’s a stripped down version. You can’t, for example, use the “Save As” function, because Server Core doesn’t have dialog boxes for functions like Open and Save As. “

Pretty stripped down for a Microsoft Operating System, the installation footprint is around 1GB, compare that to 5GB for Vista. But of course the cost of this is the lack of features which, when factored in with the target user group for this product, makes quite a bit of sense. However, what is currently lacking, and is considered to be a necessity is the .NET Framework. With the majority of new Windows apps (including management utilities) being written in .NET, it is clear that any OS from Microsoft should support .NET managed code. At the present time, as the article points out, a stripped down version of .NET is still in the works, thus the current version of Windows Server core doesn’t not feature .NET.

Given this setup, Microsoft will have no choice but to provide a reasonable set of command line apps to allow administrators the ability to perform essential tasks, and also allow them to create their own scripts, which, with the absence of .NET, is a very big challenge. The article details many of the scripts that the OS already features such as those for product activation, system patching, driver loading, and the tasks associated with the various roles the server can take on, most of which are written using VBScript. However, as afore mentioned we can expect to see a very stripped down version of .NET on this OS in the near future.

If you ask me, I wonder about this move. Yes its intriguing in a sense to see Microsoft making a bold push into a market heavily dominated by Linux and Unix. I almost wonder if they are doing so as a contingency in case Vista fails. I have said it before, as an optimist I am giving Microsoft a chance to prove itself with Vista and its new product line. Based on other articles I have read I feel the company is moving in the right direction so that product quality is increasing. However, should Vista fail, it will likely be the beginning of a long and painful death for Microsoft Windows. Notice here I say Windows, and not Microsoft as a whole. This is because Microsoft would likely continue to produce Office and other server products for a variety of platforms. It is no new fact that Microsoft has better profits with Office then they do with Windows. It will be interesting indeed to see what becomes of Microsoft should Vista be a failure. While I think XP was a good step in the right direction, Vista needs to be more so for Microsoft to maintain what credibility it has left.

Japanese Engineering


It has now been a little over one month since my study abroad experience began here in Japan. Already I have visited many areas of the country and had a chance to speak with many locals. But one thing that continues to amaze me is the ability for Japanese society to exist in a region such as it does. This was most evident when I visited Osaka, one of the biggest cities in Japan, and the biggest in the current region in which I reside (Kansai).

To begin with, we took the Shinkansen (bullet train) from Miabara to Osaka main train station. This is a truly impressive transportation mechanism. Generally a trip from Hikone, which is a station toward Osaka from Miabara, to Osaka takes roughly 1.25 hours. Using the Shinkansen we made the trip n 35 minutes. These trains are enormous and fully equipped. Its a lot like riding first class on an airline, except with more leg room and nicer seats. These trains have become an integral part of Japanese life for travel as, despite its size, it takes roughly 8 – 10 hours to go side to side on the main island, due to the mountains in the center. This is also why most Japanese cities are near the cost, there is simply nowhere to live inland, except in the mountains.

As any person can gather, this clearly creates problems for society. Where do you put new residences, and how do you lay roads to move between the residencies without taking too much space away from where people can live. These are common engineering problems facing Japanese Civil Engineers every day. Their answer is quite amazing, they build up and down. While visiting Osaka I found parts of the city underground to be larger then many of the smaller cities in Michigan. For example, getting off the train in Osaka we spent 4 hours shopping without once going outside. When we did finally go above ground it was in an 8 story mall!!! The mall was built nearly straight upwards so as to reduce its footprint. And to top it off, their was a Ferris wheel on top (see picture). This afforded a very nice view of Osaka at night. Clearly the biggest city I have ever been in, or at least the nicest big city I have ever been in (I have been to New York, but it was nothing like this).

However, while this is all amazing, the Japanese admit that most of the infrastructure is at its limit. For example, my Economics professor from Tokyo told us in class that congestion level in Tokyo are around 300%. Also, the population density is out of control, 1500 person / km^2, compare that to the US which is around 50. Absurd. And yet, the Japanese dont complain, dont get angry when they are squished into train cars. This is part of their life, they have learned to live with it. We, as Americans, really take our abundance of real estate for granted. In Japan, its very rare to drive a car in the bigger cities. This sounds inconvenient, and it was for me at first, but the train and subway systems are very well placed and walking can be reduced heavily through smart decisions. Bike riding is the norm of travel for a lot of Japanese citizens, and the roads are constructed to accommodate this.

It really is amazing, and I am thrilled each time I tour the various cities, just how compact everything is. I remember my Father talking about houses being right on top of each other when we were looking for a suitable area to build our new house. I laugh when I look at some of the houses here, where there is literally no room at all to walk between the houses. In fact, while visiting Kyoto, I made the comment that its like people just drop houses wherever there is the slightest bit of land, cause neighborhoods like similar to the building blocks I played with as a kid.

But, getting back to the topic at hand, I was told by our guide that all the shopping we had done in Osaka was at 4 different malls, all built between the train tracks and subway tracks. This is just one of many examples, as is the Supermarket store with a parking garage built on top of it. But one thing to remember is that while all these innovations the Japanese have made to make life in a hard region easier, it is not without a price. Everywhere I go their are signs of the stresses on both the environment and the infrastructure. But we cannot take away from the awesome display of engineering that allow the Japanese to thrive in such an environment.