<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d5160689\x26blogName\x3dThree+Letter+Acronyms+(TLA)\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://tla.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://tla.blogspot.com/\x26vt\x3d-8755022925038927658', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Three Letter Acronyms (TLA)

Thursday, August 30, 2007

Today's TLA is MWS.

Microsoft Winblows Sucks

Why does Microsoft windows blows so much? Follow these procedures with any Windows Program (.exe) to replicate some ill-posed behavior. Why do I feel like I have to relearn how computers think. Most POSIX machines don't even have to think about primative thinking about a space char " ".

FAILURE
C:\>cmd /c C:\Program Files\Java\jre1.5.0_11\bin\java.exe


'C:\Program' is not recognized as an internal or external command,
operable program or batch file.





PASS
C:\>cmd /c "C:\Program Files\Java\jre1.5.0_11\bin\java.exe"


Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.

....






FAILURE
C:\>cmd /c "C:\Program Files\Java\jre1.5.0_11\bin\java.exe" "C:\Documents and Settings\dev\TestProgram"



'C:\Program' is not recognized as an internal or external command,
operable program or batch file.




PASS
C:\>cmd /c ""C:\Program Files\Java\jre1.5.0_11\bin\java.exe" "C:\Documents and Settings\dev\TestProgram""

Exception in thread "main" java.lang.NoClassDefFoundError: C:\Documents and Settings\dev\TestProgram





So what does this little experiment tell us about cmd.exe? It is really dumb you have to quotize everything in Microsoft world just for a simple " " (space)

IFF you have something called an executable with a full path

c:\a space\in my\someprogram.exe

and you have text file with a full path

c:\a space\in my\file.txt

then you have to escape both strings as part of a bigger string.

C:\> cmd.exe /c ""c:\a space\in my\someprogram.exe" "c:\a space\in my\file.txt""

This is lame. Do we have to think like this in any POSIX machine? I think not!!!!


Enjoy,
Jonathan

Friday, August 10, 2007

Today's TLA is MWP

Microsoft Wizard Programming

Why does Microsoft have a wizard for setting up a simple command line program? This is by far one of the worst ideas for development. I mean it is a very strict and communist approach to programming. It tries to solve the Makefile problem, but I would rather deal with Make than trying to setup the Microsoft Visual C++ projects again. I mean both tools try to solve the same problem. If I have to say one thing about computers it is that computers are stupid. I don't care what anyone will say, but if you don't put a library correctly your program will not work. This is why we have tools like Make and VC++. They ensure the proper definition of paths for a program. Rules of thumb with regards to libraries.

1) Don't mispell libraries (Be aware of upper and lower case i.e. Alib,ALib)
2) Double check the full path before you copy and paste anywhere. It takes 2 seconds to check the directory. But it could take an hour trying to find where you misspelled some file path. It's the measure 4x but cut once approach.
3) Check your syntax and Google for your errors.


These are just some tips for programming. It annoys me that Windows uses a wizard approach, because you can't change your mind. So what if I originally created a .exe project and I wanted to change it into DLL, ActiveX, or some MFC application. Well you might as well create a new project, because it sucks trying to manually do it. This really annoys the heck out of me, why is there so many boilerplate strings everywhere just for a simple Hello World app for Win32 applications. I really hate the fact that I can't change my mind in the middle of programming. And with programming change is central to everything that we do.

Enjoy,
Jonathan

Thursday, August 02, 2007

Today's TLA is HGP

Hack-Gile Programmer

This is a nerdy post. OK so I have been a programmer for 7 years now. I want to comment on approaches/philosophies which I have learned. So I have read many different methodologies for working with software. For me the best way to program is something which I call Hack-gile programming. Pretty much it is the only way good software engineers work to produce something which we call "software". Good engineers are innovative and have a knack to fiddle with archaic tools and esoteric code. So they need to fiddle with things in order to deliver proper software behavior. This is the "hack" part of the word. However, good software engineers also need to meet the demands from product managers, third-party vendors, and (in shock and horror) the actual customer in a timely manner. This is the "agile" part of the word. Agility means using good software tools. A great example is Cruisecontrol. It can schedule builds and track your code repository for changes and triggers a build accordingly when a change occurs. This leads me to the core of software which is change. Change is a necessity in the world. And it is central when you deal with software. How to deal with change and how to quickly adapt because of change and how quickly to solve problems when everything and anything changes is a true art form in software engineering. This is when software becomes an art form and one in which I am continuously trying to master, but I am getting better at it. Some software engineers fear change, but as I grow older I welcome it, because it is a great opportunity to learn from a new problem to solve. Learning and incorporating past problems to solve new problems for a changing growing world is probably the best life lesson from being a hack-gile programmer.

Enjoy,
Jonathan