Archive for the ‘Rant’ Category

September 2nd, 2008

Google Chrome, The New Kid On The Block

So when Google announced they had a new browser that was going to break down all the barriers of the internet and the desktop I got excited at the prospects of what they were going to do and what this new user interaction would be. Well today they finally announced the release of the browser and made it public at:

http://www.google.com/chrome

However after a quick inspection of the user-agent I soon realized that they didn’t create a new browser just a slight modification of Apple Safari.

It is Safari with just a more standard Windows interface, something Apple should have really done. They even copied it all the way down to the great XML support that Safari has.

Here are some more of the screen shots from Chrome.

I honestly would wait and not give this any air time, but I know that won’t be the case because everybody is already fawning over it. Now thanks to Google and the slight modifications they made we now have a 5th browser that us developers now have to support.

Thanks for nothing Google.

Tags: , , ,

Posted in Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 1 Comment »

May 23rd, 2008

Microsoft Source Analysis Still Needs Work

Somebody is wrong on the internetMicrosoft just released a tool called Microsoft Source Analysis for C#. Apparently it is a tool they use internally to make sure all their souce code looks the same and is easily readable by all those who use it. According to the blog post that announced this:

Source Analysis comes with a set of default rules analyzers covering approximately 200 best practice rules. These rules are full compatible with the default layout settings in Visual Studio 2005 and Visual Studio 2008.

Specifically, these rules cover the following, in no particular order:

  • Layout of elements, statements, expressions, and query clauses
  • Placement of curly brackets, parenthesis, square brackets, etc
  • Spacing around keywords and operator symbols
  • Line spacing
  • Placement of method parameters within method declarations or method calls
  • Standard ordering of elements within a class
  • Formatting of documentation within element headers and file headers
  • Naming of elements, fields and variables
  • Use of the built-in types
  • Use of access modifiers
  • Allowed contents of files
  • Debugging text

So being a neat freak about my code I had to download this tool and give it a shot. I was very excited about the tool and had great hopes for it. However when I actually tried the tool, there was no configuration for turnning off some of the rules that you didn’t agree with, like there is in the code analysis analyics tool.

I got literlly over 1000 messages about using spaces instead of tabs, in 3 files, because they felt it nessisary to alert me about every single line of code in my files. They also suggest I put the using statements inside of my namespace. I don’t know about you, but I hate the look of that, because stuff should be logically packed together. Only the classes show up in the namespace when you are referencing them, and the using statements are just a compiler indicator, not actual code. It did alert me about a couple of things that I found useful, such as when some of my XML comments weren’t long enough and or missing, and other nicities that I can agree with.

However, I am one of those strange developers, according to Microsoft, that likes to use tabs and have my declartion of using statements outside of my namespace. If I were to take this tool seriously I would have to be shunned from the Microsoft Campus and shammed in to never coding again. I guess I should start including the Rob Conery SupressMessage on my code:

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "1000:YouShouldntBeCoding", MessageId = "1#",
Justification="That's not very nice... but I'm used to it :p")]

Of course I am joking about this, and I think these rules from Microsoft are totally wrong and out of wack with most C# developers. Mostly for the fact that the rules are not fully compatible with Microsofts own defaults they ship. First of all when you create a new class in C# the using statements are outside of the class you create. Second I find that using spaces just forces me to resync my code formatting more often because the spaces tend to get out of wack when you are developing software. Plus you are creating 400% more bytes in your file by using spaces over tabs. I know harddisk space doesn’t cost that much, but if you are using a system like TFS it just adds unnessisary bloat to your SQL Server database.

I would have probably agreed with a good 95% of their over 200 rules, if I could get past the 3 files with over 1000 messages about using spaces instead of tabs. I really feel one alert is good enough. It still has many usability and configuration issues to overcome before it will be widely accepted by non-Microsoft developers. Plus all that being said above, I am just stubborn and like my coding style.

Posted in C#, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 8 Comments »

May 13th, 2008

Software Developers Never Change

Whenever I am tasked with looking over a fellow developers code I always keep the following in mind, in order to ground myself:

your program (n): a maze of non-sequiturs littered with clever-clever tricks and irrelevant comments. Compare MY PROGRAM.

my program (n): a gem of algorithmic precision, offering the most sublime balance between compact, efficient coding on the one hand, and fully commented legibility for posterity on the other. Compare YOUR PROGRAM.

I found this on Jeff Atwood’s blog last year, and it pretty much sums up every programmer that I have ever met even my self.

What made me think of this and want to share it with my readers was a posting I saw on Lazycoder’s blog today. Which was a reposting of a Reddit comment. I am going to break down the comment with my own comments on the subject, because I feel it is important for people, especially young software developers, to fully understand the wisdom in this comment that was posted on Reddit.

I’m sorry, but this is just nonsense.

People are forever coming along and proclaiming that software engineering is in a state of crisis. And always their reasoning is that (other) programmers aren’t smart enough.

You will find many software developers, in your career, who have a martyr complex. They see them selves as gods gift to the computer, and their code could only be matched if Einstein, Mozart, and Michaelangelo could be combined in to one person of complete brilliance. Of course this is all crap and their code usually is far below average. In reality they just don’t have enough time, to study up and learn new techniques, between playing WOW and filling out their fantasy football charts. So they need a scape goat and it is usually that their co-workers are slacking off, or they aren’t “smart enough” to keep up with their brilliance.

If you can’t figure out who this guy, that I described above, is in your office, chances are YOU are “that guy”.

They, of course, are special magical code gunslingers with superhuman intelligence, members of the top 5%. (Surely software engineering is blessed to have 90% of its practitioners located in the top 5%!)

But the truth is that there is no crisis, and there never has been. The only problem, and the reason software projects keep failing, is that of unrealistic expectations.

I believe there are unrealistic expectations, because many project managers were former coders, and in my experience half of them that I have worked for are “that guy” that I mentioned above. However the blame as I see it is a project managers complete ignorance in how to set expectations with his boss.

My personal philosophy, even before I had the words, has always been “under promise, over deliver”. That is how you become a rock star in your field, no matter what it is.

Software is hard. Really hard. This should not be surprising to anyone who understands that it is really the field of assembling instructions for doing… anything. Anything that people want to get done. It’s sort of a meta-field that encompasses almost all other fields, with more being added every day.

Of course it’s hard. The only real question is why people consistently underestimate its difficulty, especially why they underestimate the difficulty of any particular software engineering task.

One word: Hollywoodization. In Hollywood all programming is done through a GUI that doesn’t look any different than the kids games of dragging the square object in to the square hole.

Also project managers conveniently forget their stints as software developers, because their yearly bonus relies on released the code by using 80% of the staff that is required and doing it in 80% of the time it would normally take.

It’s always about numbers and money.

I think there are a number of reasons for this:

1. “It fits in the little box, how big can it be?” Humans, particularly those who aren’t technical, have a tendency to judge difficulty with their eyes.

There is nothing more true than this statement. Politicians have a statement for this: Perception is reality. The perception is that small things go in small places, in reality these people don’t take in to account the vastness of a hard drive or the internet. That is why companies such as IBM spend millions of dollars in advertising to explain how a whole server room can fit in one rack of blade servers.

2. “It’s just a word processor.” Everyone understands what they are building, what the set of instructions is supposed to do, and they probably know how to do it by hand, albeit very slowly. They tend to assume that writing the software is just a matter of telling the computer to do the same thing, but faster. What they do not realize is that they don’t really know how their brain works at all, and that all the details which they can just leave to their giant neural net when doing it by hand, have to be figured out and brought consciously to the software.

Programmers have an acronym response for this mentality: SMOP which means Small Matter of Programming. It is an inside joke, because most programmers understand there is nothing small even with the smallest feature request. New features have a rippling effect through the whole application especially when your widget was never designed to do what it is now being asked to do.

3. The Cult of Smart. Programmers, on the other hand, have figured out that software is complicated, and that being smart really helps; in fact, nothing is a substitute for it. This causes them to emphasize it, convince themselves that they have an abundant amount of it, and to convince themselves that results are not the result of them learning about problem domains, and building better and better versions iteratively, but just the inevitable consequence of bringing their enormous brain to bear. This leads to things like the “Agile Methodology”, as in “I’m so Agile I don’t need a Methodology.” Instead of realizing that you have throw one away (usually more like ten), they think they can be so magically smart they don’t have to.

This mental break down usually happens with “that guy” mentioned above. He might have started out as a decent programmer, buy somewhere in his career he got one too many pats on the back and it all went to his head. He stopped searching out for new knowledge and become content with his current set of knowledge. Or he got distracted in an unrelated field because he felt he was at the top of the software development field, and while he was collecting paychecks for software development, and focusing on his distraction, the software development field passed him by, but he was too distracted to notice.

Either way this person lost sight of what originally brought them to software development and kept them thirsting for every protocol and every byte they could consume. Most of these guys never get the chance to get back in the game either. So stay focused and do what you love. If you love hockey and software development is only your 9-5 make sure you don’t fall in the trap of thinking you are at the top of your game in software development because you don’t have the time or ambition to learn anymore. And fully understand that the software development field is going to pass you by.

4. Expectations based on hardware. Chips are square. A linear decrease in CMOS transistor size results in a quadratic increase in the number that can be packed on a chip. Code is linear. A linear decrease in the amount of time it takes to produce X amount of code is merely a linear increase in the amount of code that can be produced. This results in an ever-widening design productivity gap, where capacity forever recedes away from our ability to exploit it. We can waste some of that excess capacity to save programmer time (this is why high-level languages have an expanding role in the field), but this is never going to go away. It isn’t that software is inherently blighted. It’s that hardware is inherently blessed.

Amen to that… There is no scientific break through that is going to help one software developer add 30 new features to a well developed application in 18 months. Software developers don’t have “magic bullets” that introduce instant yield like argon-injected-krypton LASERS to make our software 35% smaller. In fact most software development is a total 180 from hardware development. In hardware everything gets smaller and uses less power, however in software everything gets bigger and uses more power.

Even with this all said and new software developers learning these facts of life in their profession, nothing is going to change, 30 years from now the same problems are going to face the same people. Half of the “problem” comes from the kind of people that the software development field attacks, and the other half comes from poor education of college vs. real life. In college the focus is on perfection, in real life the focus in is on turn around time. If you haven’t realized it yet perfection and turn around time are usually poler opposites of each other.

So if you are to take anything away from this rant, take this, do what you love, and become the best at it. And if what you love isn’t your 9-5 job, deeply understand this and get out of the way of people who’s 9-5 job is what they love.

Well I hope this rant amused some of your and educated others. I guess I just had a lot to get off my chest.

Tags: , ,

Posted in Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 15 Comments »

May 1st, 2008

When Dell Usability Engineering Goes Horribly Wrong

Today I was reading Engadget like I normally do in the morning to check out all the latest gadgets that they scour the internet for. And I happened across this new keyboard design that Dell is releasing with their Vostro models in the UK. I don’t know about you, but I specifically stay clear of keyboards where the backspace key is crunched down to add the backslash key on the top row. But I have never seen this keyboard layout before, where the backslash key is on the bottom left of the keyboard. I think the usability engineer that designed this keyboard should be fired, that is assuming that Dell didn’t randomly toss keys at the keyboard and let them stay where they fell.

This design has to be experienced because me describing it doesn’t do it justice for how bad of a design it is.

US Version

Dell Vostro US Version

UK Version

Dell Vostro UK Version

Somebody may want to mention this blunder on Dell Idea Storm.

Tags: , ,

Posted in Rant, Uncategorized | kick it on DotNetKicks.com | Bookmark | View blog reactions | 6 Comments »

April 25th, 2008

Why isn’t Journalistic integrity important to Slashdot anymore?

Slashdot has been around for over a decade now and many tech nerds first cut their teeth on Slashdot as an information source for everything tech related, because it predated the blogging revolution by almost a half decade.  I can say with an almost certainty that every person who visits my blog each day, has at one point in their life read Slashdot.  I know this because, many of you like myself, for many years Slashdot was the first place you visited in the morning to checkout the latest nerd-news, and it was such an honor if one of your stories actually made it the front page.  Everything was bliss because the editors of Slashdot really tried to get good content to the viewers of the site, the editors were a little slanted towards the LAMP stack, but at least the content that made it to the front page was accurate.

Now like most journalism, no facts are checked, and stories are pushed through in order to driven an agenda.  For example:

500 Thousand MS Web Servers Hacked

Posted by kdawson on Friday April 25, @11:48AM
from the scream-and-shout dept.

andrewd18 writes “According to F-Secure, over 500,000 webservers across the world, including some from the United Nations and UK government, have been victims of a SQL injection. The attack uses an SQL injection to reroute clients to a malicious javascript at nmidahena.com, aspder.com or nihaorr1.com, which use another set of exploits to install a Trojan on the client’s computer. As per usual, Firefox users with NoScript should be safe from the client exploit, but server admins should be alert for the server-side injection. Brian Krebs has a decent writeup on his Washington Post Security Blog, Dynamoo has a list of some of the high-profile sites that has been hacked, and for fun you can watch some of the IIS admins run around in circles at one of the many IIS forums on the ‘net.”

Every person that reads my blog should have a basic understanding of why this title is 180 degrees out of whack with the actual article that is quoted.  If not here is the short description of what in this article, on Slashdot, is totally wrong and the editor who approved it kdawson should be fired for gross negligence.  Luckily most of the comments on the Slashdot article show a more intelligence and greater understanding of the actual problem than the Slashdot poster and editor.  But you shouldn’t have to read between the lines to get the actual story from the Slashdot article.

First of all SQL injections are a result of bad programming and are platform independent.  And are usually the result of concatenating a SQL string together in code instead of using parameters in your SQL queries.  So as you can imagine scripting languages like PHP and Old ASP have a ton of problems with SQL injection, which is unfortunate because these two languages are in the top 5 languages that run the web, luckily Old ASP has been decreasing because of ASP.NET.  However just to reiterate SQL injection can happen in any language on any platform because there are bad developers that use everything language and every platform.

So basically to say that 500,000 Microsoft web servers were hacked is a gross misrepresentation of the problem that was illustrated in the article.  The original F-Secure article had to clarify that this wasn’t Microsoft’s problem, probably because of the Slashdot article listed above.

We’ve been receiving some questions on the platform and operating systems affected by this attack. So far we’ve only seen websites using Microsoft IIS webserver and Microsoft SQL Server being hit. Do note that this attack doesn’t use any vulnerabilities in any of those two applications. What makes this attack possible is poorly written ASP and ASPX (.net) code.

If you are interested in seeing all the pages effected and if one of your pages is involved you can use this Google Link, however make sure to take precautions against getting infected.  I will leave everybody with this last posting that was left in one of the IIS forums as a sign of what good programmers are combating every day.

I also have been hit by this attack on Saturday 4/12/08. It compromised our database and overwritten that script into all of your products. Luckily a database restore fixed the problem. Two days later the same thing happened, I have changed all the database and login passwords and did another db restore. Now today 4/18/08 we got hit again by the same thing but this time as the pages are loaded ActivX is activated and wants to run but of course I did not allow it. Anybody has successfully solved this situation?

Posted in Rant, SQL | kick it on DotNetKicks.com | Bookmark | View blog reactions | 2 Comments »

April 18th, 2008

Apple Developers Continue To Not Impress

Apple “Windows Developers” continue to not impress me.  Check out the latest in “I decided to release something too early”-product from Steve Jobs and Apple.  I haven’t yet decided if Steve Jobs is trying to take down the Windows Empire with crappy Apple Software, or if Apple is just inept at creating anything but software for Apple.  I prefer to think Steve Jobs just forces Mac Developers to begrudgingly work on Windows Software, instead of actually hiring developers that are passionate about Windows Development.

Tags:

Posted in Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

April 17th, 2008

Google Ads Allowing Flash To Take Over Browser

So today I saw this Google Flash Ad, for John McCain for President, appear on a site that I am developing. I thought I would let everybody know to watch out for Google Flash Ad’s that have access to modify your browser. This isn’t a big deal, in my case, but Flash has the ability to also modify, other things such as:

  • Browser’s Footer
  • Browser’s URL
  • Back Button
  • Forward Button
  • etc.

Basically Flash is allowed to have more access because it actually runs as an application on top of the browser instead of through the browser. It is just disturbing that Google doesn’t police the advertisements better. It is conceivable that Google could potentially be providing malware via their ad network.

Tags: , ,

Posted in Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

April 11th, 2008

WTF Apple, Show Some Common Courtesy

Common courtesy is very important for all application developers to follow especially when they are dealing with users settings. Especially for common file formats, where the user has probably already set up their preferences how they like. And most importantly to not piss off your install base.

As you might have gathered from the title Apple has screwed up in this area yet again. In their never ending battle to try and forcibly get an install base, from some of their crappiest application. The Apple developers must taken the same “Our shit doesn’t stink”-attitude as many of their users, and started taking over the preferences on the users machine with out asking.

Like any good .NET developer I had the XML file format being opened by Visual Studio, it has a nice viewing, and editing interface that is hard to beat. Today I saw their was a QuickTime update while watching the Facebook Conferences presentation in anticipation of my previous post today. So as I decided to do the update, what a nightmare that has turned out to be. First of all it was 70 MB download, because Apple also decided that iTunes and Safari needed to be downloaded with Quicktime, and bundled them all together. Then it decides to take over all my documents in my system, including HTML, XML, and a bunch of other web related documents. See below.

Then to boot their XML “Rendering” sucks.

Safari XML Rendering Sucks

Hey news flash Steve Jobs this is how a real browser renders XML, and does a damn fine job at it.

IE XML Rendering Doesn't Suck

At least if you are going to take over my system, and forcibly put your software on my computer, the very least you could do is not make it suck. Is that too much to ask.

Steve Jobs has to learn that Windows users don’t put up with the same amount of shit as Apples users do, because one we don’t bow down at the alter of Steve Jobs, and two we have other options. I am not going to let Steve Jobs take a steaming pile of shit on my PC, change all the settings, install one of the worst browsers on earth, and then forgive him. He is going to have to do something grand with Safari to get it back on my PC.

I am really pissed that I now have to uninstall a program that I never wanted installed in the first place, and then go through the registry and clean up after an Apple Developer that couldn’t find his way out of a paper bag.

Maybe they should spend less time trying to achieve an ACID3 milestone that won’t be standard for another couple of years and work on the basics that IE for the better part of a decade now.

Tags: , , , , ,

Posted in Personal, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 5 Comments »

April 3rd, 2008

Why is JSON Deserialization so Important to Developers?

Recently I have been working on a RESTful interface for a Web 2.0 project that I will be releasing very soon. And one of the self imposed requirements that I set out to achieve was to have the RESTful interface output the same structure JSON as XML. This way that any developer using the interface would feel comfortable using the JSON and XML interchangeably. But, I have been having a lot of trouble recently getting my JSON and XML to output the same structure when using the built in .NET methods. I have tried the following:

  • JavaScriptSerializer/XmlSerializer
  • DataContractJsonSerializer/DataContractSerializer

Neither can be forced to output the same structure. Mostly because they are both concerned about serialization and deserialization. Now I ask the question, Why is JSON deserialization so important to have? JSON stands for JavaScript Object Notation, the keyword in there is JavaScript, why are we trying to force a technology designed for a specific language and purpose in to a different technology. In my opinion it seems akin to trying to communicate between two JavaScript methods with the following C# code:

struct MyData {
    public string Name = "Nick Berardi";
    public Uri Blog = new Uri("http://www.coderjournal.com");
    public DateTime BirthDate = new BirthDate(1980, 3, 14, 0, 0, 0);
}

There is no point to doing that because the JavaScript language already has a way to communicate objects, it’s called JSON. So why as C# developers, or whatever language we use, we insist on creating a deserializer when only a serializer is needed to translate our preferred object to JSON so that JavaScript, different language, can understand. By creating a deserializer we are basically encouraging/saying that this is a valid way to communicate between languages.

I personally see JSON as a communication protocol between two non-JavaScript languages as a fad. The communication between two non-JavaScript languages has already been decided to be either Remoting or XML, both were created with this idea of object transportation in mine, and both are very extensible and don’t fall short where JSON does.

Now that all that is said, I personally don’t have a problem with JSON having a deserializer, because there is going to be a time when you need to deserialize JSON, but it should be the exception not the rule, and it shouldn’t be part of the JSON serializer. I say this for the following reason, because when you combine a serializer and deserializer there is an expectation that the type is going to be the same going in as coming out. This was planned for in XML, with XML namespaces to define the type, however this was not planned for in JSON, so special cases have to be developed in order to support deserialization such as the inclusion of “__type” property in the JSON object. As illustrated in this article from Scott Hanselman:

{ "__type":"ConsoleApplication1.Person, ConsoleApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" ... }

You may say, “So what, that is what needs to be done to deserialize the object.” Well that my friends is called a Hack, and as professional developers we shouldn’t be hacking technologies, that were not designed for our purpose, together with our applications.

Tags: , ,

Posted in C#, Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 1 Comment »

March 30th, 2008

Apple Safari Team priorities out of wack

Three interesting things about Apple Safari came out this past week.

  1. Apple Safari 3.1 passed the Acid 3 test
  2. Apple Safari running on a Mac was hacked in 2 minutes flat at PWN To OWN and fell in the second round using a default install of Mac OS X software.  Even Vista made it to the third round where it was successfully hacked through the Adobe Flash plug-in for IE 7.
  3. Apple is pushing Safari to Windows users with out their permission.

In my opinion it is great that the Apple Safari team is working very hard to support web standards. However that should be secondary to building a secure browser platform that is going to protect their user base.  This should be obvious to every developer with in Apple, because Acid 3 features aren’t currently out on the net, so support isn’t that critical, however browser exploits are out there right now just looking for prey.

Combine all that with Apple pushing Safari out to Windows with out asking for permission from the user of the computer.  Windows already has enough problems with security and doesn’t need a new one pushed on it by Apple.

Tags: , , , , ,

Posted in Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 5 Comments »