Today is a good day to code

I moved to wordpress

Posted: February 6th, 2009 | Author: | Filed under: Uncategorized | No Comments »

I’ll get all the old content in soon!


Mides and The PHP Interpreter

Posted: January 17th, 2009 | Author: | Filed under: mides, Uncategorized | Tags: , , , , , , , | No Comments »

Mides and The PHP Interpreter

I really want to put a PHP interpreter into Mides, the problem is my interpretation of the Ts & Cs of the App Store. It is my understanding that executing downloaded scripts is prohibited. To the best of my knowledge, downloading a bunch of PHP templates and running them through the interpreter runs afoul of that provision.

What that really means to me is that the dream that I had when I originally wrote Mides will be a long time coming. I think that with some competition, Apple will hopefully broaden the types of applications that are available in the app store. It would be fantastic if they allowed scripting languages to be included in apps. It would be awesome to have the ability to have ruby on the device, as well as PHP and Python. Really the only platform that I could put some sort of PHP interpreter onto would be Android, but for some reason I am just not super excited about it.

What I am super excited about is the Palm Pre. It looks sweet, oh well Mides fans, I guess we’ll just have to wait.

* 5/6/2009 – I am currently working on a Dalvik compatible compiler for PHP that will work on Android.  It is a bit harder than I thought, so we’ll see if I can get through it.  I looked at it on iPhone, and it still seems to be a no-go. *


Why I Will Never Specialize

Posted: January 5th, 2009 | Author: | Filed under: java, Programming, Uncategorized | Tags: | No Comments »

Why I Will Never Specialize

Picture of IrvinI realized a few weeks ago that I had left behind the concept of being an expert in any particular language. Not that being an expert is all bad, however the pace of change in software development makes it impractical.

For a while now my interviewing ( candidates ) has changed to reflect that belief. I frequently get into constructive arguments with my hiring managers about the types of resumes they are sending to me to screen. The problem isn’t that they aren’t qualified, the problem that I see is that they are insanely qualified. Meaning that they have for example 20 years of Java or something with no hint of other languages, or techniques. I mean how many awesome programmers have you met that had never deployed their own PHP server, or their own tomcat server. How many programmers have had no experience with shell scripting.

Actually a red flag for me is someone who has never even looked at what Microsoft has to offer. I don’t use Microsoft technologies, but I have worked for companies where I did, and I stay as informed as possible about their various languages and APIs. The reason is because I am interested in programming, not in making a bunch of money ( even though that would be nice ) or finding a cush job to lounge in. I really want to understand what is happening inside of the compiler, etc…

I mean recently I started on a foray into what I thought was the V8 JavaScript engine, which is *MEGA COOL* by the way, but I found myself looking at the assembly language commands and thinking, hmmm… I want to understand that. So I started digging in, and now I think that assembly language is cool. Boy, I’m a long way from ColdFusion.

I don’t have anything against people who specialize in one language. That is the way people hire, the reqs always are asking for 10 years experience in Java or some truck like that. I would prefer the req say, and they do when I have control of them, 10 years of programming experience, which means you could be 18 or 75, its all the same to me. The best resumes are the ones where the person has just about every language, with one at around 8 to 10 years of experience, but lots of side projects in everything from lisp to sed and awk. It is probably hurting my chances of getting ahead in my career, but that doesn’t matter, that I won’t just stick to one thing, but I really want to understand this, I want to know how it all works, and I want to have a part in making it better.

It probably means that I am a freak.


Installing ColdFusion MX 7, and the Apache Connector on Leopard Server (10.5.5)

Posted: December 31st, 2008 | Author: | Filed under: Apple, ColdFusion, Companies, java, Programming, Uncategorized | Tags: , , , , , , , | No Comments »

Installing ColdFusion MX 7, and the Apache Connector on Leopard Server (10.5.5)

Picture of IrvinThis weekend, I spent an unpleasant 24 hours or so working on upgrading a client’s server to Leopard 10.5.5. The actual Leopard upgrade went pretty well on the G5 XServe. The secret to that was having a crossover cable, and knowing the specific RackMac system identifier to be able to get the IP address to SSH into. The problems started with ColdFusion.

Now I am going to rant. My client has an Enterprise license, so we aren’t running on some hacked up installation, we are running a major OS that has been on the market for about a year, it has been in the hands of developers for more than a year. That there isn’t a proper connector bundled with the installation is criminal. If I wanted to go hacking around inside of source code, building crap, I could run open source. Why did we pay so much money for this? I will not write any more private applications with ColdFusion. If a corporation wants me to build ColdFusion applications, I may, but only after I try to convince them to go with something that is more likely to be supported on UNIX / Mac OS X.

I mean, how long has Apache 2 64-bit been out there, this shouldn’t come as a surprise to Adobe. I can’t trust that they will support major platforms going into the future. This is because of one or both of two things. The first possibility is that Adobe doesn’t want to put money into ColdFusion because it is dead or dying, the second is that Adobe wants to force people to upgrade to ColdFusion 8 by any means necessary. What Adobe has done is to make me look bad in front of my clients for choosing a technology that was not supported. I have already begun to write my applications in RoR, now I am definitely going to write my applications in RoR. I am done. I could have made so much more money writing code instead of screwing around with compiler flags.

The problem is that I would expect to run into trouble installing or running my software when using OSS. That comes with the territory, but when you buy software and it claims to support the platform, one would reasonably assume that the platform would be fully and actively supported. Anyway, rant over.

Now I will show how I fixed the problem:

First:

If you have a standalone installation (the only one that works), you will need to start it by switching to your ColdFusion directory, if you followed the defaults, it will be /Applications/ColdFusionMX7/runtime/bin. You will need to issue the JRun command from here ./jrun -start coldfusion. This will work, if you try to start it any other way, you will get the THIS_PROCESS_HAS_FORKED errors.

If you have installed it in multi-server, you are screwed, I have not found any decent way to get this to work.

Second:

You should be able to get to the administrator on http://127.0.0.1:8500/CFIDE/Administrator/index.cfm. Then you will need to set up the connector, this was crazy. The solution I am about to post I found on Scott Pinkston’s blog. The post is called ColdFusion 8 Leopard with apache an answer for the rest of us. It is generally for CF 8, but it will work on ColdFusion MX 7.

Here are the steps from his blog:

go to terminal window.
cd /Applications/JRun4/lib
unzip -d src wsconfig.jar
cd src/connectors/src  

apxs -c -Wc,-arch -Wc,x86_64 -Wl,-arch -Wl,x86_64 -n jrun22
mod_jrun22.c jrun_maptable_impl.c jrun_property.c jrun_session.c
platform.c jrun_mutex.c jrun_proxy.c jrun_utils.c

apxs -i -n jrun22 -S LIBEXECDIR=/Applications/JRun4/lib/src/connectors/src/
mod_jrun22.la

strip mod_jrun22.so

Now run the connector configuration:
sudo java -jar /Applications/JRun4/lib/wsconfig.jar

After it finishes, run this command:
cp /Applications/JRun4/lib/src/connectors/src/mod_jrun22.so /Applications/JRun4/lib/wsconfig/1/mod_jrun22.so

sudo apachectl restart

The order of the files to be compiled is *IMPORTANT* I was working on a Dual-G5 2.3 GHz so my command was /usr/sbin/apxs -c -Wc,-arch -Wc,ppc64 -Wl,-arch -Wl,ppc64 -n jrun22 mod_jrun22.c jrun_maptable_impl.c jrun_property.c jrun_session.c platform.c jrun_mutex.c jrun_proxy.c jrun_utils.c.

You will get some warnings, you can ignore them. If you get an error saying something about functions that start with an underscore in your apache error logs, when you try to start it, you have the file names in the wrong order. If you see an error that says it found the module, and it is mach-o, but it is the wrong architecture, you are probably using -WI (I as in imitate) instead of Wl (l as in Larry).

Step 3:

Make sure to add the add handler to your httpd.conf. in the ifmodule for mod_jrun22.so. Mine did not install this by default, so my ColdFusion templates were coming up with the code showing up as plain text. Here is the default handler: AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf.

I hope this prevents anyone from going through the ridiculous configuration nightmare that I went through this weekend. I apologize for the rant, but I have some other cool projects that I would rather work on than spending forever hacking around with my application server.


What Does a Sun Bankruptcy do to Enterprise?

Posted: December 29th, 2008 | Author: | Filed under: Companies, java, Programming, Sun Microsystems, Uncategorized | Tags: , | No Comments »

What Does a Sun Bankruptcy do to Enterprise?

Picture of IrvinFor more than a few weeks now, I have been pondering some broad implications of companies that we all rely upon failing. Probably the grand-daddy of these is Sun Microsystems.

Normally I wouldn’t be concerned about tech companies going away. It is part of the normal advancement of the art, but in Sun’s case, it does concern me. While I don’t share many developers’ blind love of Java, or Solaris, or any product really. I do feel that Sun has given a tremendous amount to the software engineering community and would be sorely missed if they were to go belly up. At the time of my writing this, Sun’s stock is at $3.41 per share, and their market capitalization is 2.52 Billion, less than Sun has on hand in cash.

I don’t necessarily think that Sun is in financial trouble, but it does seem that there are a bunch of products that they release that are mostly not for pay. Not to mention that their financial performance may / should, be giving some corporate IT departments pause as to their dependence on their technologies. Many companies rely on support from Sun, and if that were to transition to the community, the level of response may not be sufficient. The question I would ask is, “Will a Sun Bankruptcy Drive Corporations Back to Microsoft?”

Unfortunately, I can’t see any other alternative at the moment. There are millions of lines of code out there written against the Sun JVM, and while the JVM is now mostly open source, and so is Solaris, the companies that count on those lines of code typically are not interested in maintaining that code as well. Without Sun, you could have JVM forking, Solaris forking, etc… where a particular application written against Java or Solaris may not run in a given company. Corporations would have none of these problems if they used the .net stack for application development.

Now, I am not advocating that all corporations out there should drop their Sun implementations and run to Microsoft, but what I am saying is that they should prepare themselves for a little instability. I tend to use Ruby and the Rails framework for most everything anymore, but I have come to be somewhat skeptical of the gems that I am using. I am also aware that there is currently no support beyond community support for most of these items, and the developers working on them could get bored and go away. So for functionality that is more than a nice-to-have, I tend to write it myself.

Hopefully this will go away when we start to see professional gem houses, but in the near term, I would hope that companies would begin to diversify their stack a bit so as to mitigate the cost, such as re-engineering their non-core systems to be less dependent on core software from a particular vendor. The last thing you would want would be to find a showstopper bug in something you were about to release that was based on a technology from a shaky vendor, that holds up your business process.

Most good IT shops already support a variety of technologies so as to not be locked in to any one particular implementation from any given vendor, but enterprise developers should not continue to believe that Sun or Java will be around forever in its current enterprise-blessed, no-brainer form. I think serious unbiased evaluation of technologies to be included in future products should gradually become the norm. If Microsoft wins, so-be it, there is some good stuff in .net, but I would hope that Ruby and PHP would benefit from this situation.


Setting Up VirtualBox Headless on Ubuntu 8.10

Posted: December 28th, 2008 | Author: | Filed under: Companies, Sun Microsystems, Uncategorized | Tags: | No Comments »

Setting Up VirtualBox Headless on Ubuntu 8.10

Picture of IrvinOver the weekend I have been setting up a RoR rig with MySQL replication. The problem I have is that I only have one machine that I can use of all of this. My solution is VirtualBox Headless.

The first step is naturally to install Ubuntu Server 8.10. There is no UI. The next step changed what should have been a 5 minute task into a 3 hour task. Pay close attention… If you use apt-get install virtualbox, you will get virtualbox 2.0.4 OSE version. The open source version does not have the built-in RDP server. So when you try to issue the command sudo VBoxManage modifyvm “vmName” -vrdpport 4389 or whatever, you will get an error back. My solution was to download the non OSE version from Sun’s VirtualBox site. After that, just issue the normal Debian dpkg command to install VirtualBox 2.0.4 non-OSE. There is an issue with the kernel driver not being updated with the kernel that may cause problems later, but I didn’t do anything with that.

After you get it installed, follow the instructions here : https://help.ubuntu.com/community/VirtualBox for getting VRDP up and running. You have to create a new PAM authentication file.

After that things work as advertised. Remember, if you want to run headless over VRDP, you *must* install the non-OSE version directly from Sun’s VirtualBox site. Follow the instructions there if you want for the kernel driver to automatically update and recompile if the kernel changes.


Bold Predictions About Rails

Posted: December 27th, 2008 | Author: | Filed under: Programming, Rails, Ruby, Uncategorized | Tags: , , | No Comments »

Bold Predictions About Rails

Picture of IrvinFor a couple of years now I have been very disparaging of Rails, and in general the whole convention driven development movement. I have always figured that maybe I could do things a little better myself perhaps. Recently, however I have found myself using rails, and in a larger sense, adding Ruby to my toolbox, and have been a much happier programmer.

What suprises me is how many excuses I found myself making about why I shouldn’t use Rails. What I eventually realized is that I didn’t care if I could write that CRUD code a little better, or if I could shave a tenth of a second of execution time from whatever function I had written in *name the language* the important thing was that I could get my project done and get outside, or work on several projects simultaneously, instead of only two. I found myself spending time and thought cycles on code that was directly related to solving my problem, instead of code to get me to where I could start solving my problem.

Now I am always suprised when I hear my same old excuses coming out of other good developers’ mouths. I want to say, “you just don’t understand.”

The reality of the situation is that the ground has shifted under our feet. Because of rails, business stakeholders are demanding quicker turnaround on features and products, and non-rails shops are struggling to keep up.

Performance is always the first crotchety old excuse, the answer is memcache. Then reliability, f5 big ip is the answer.

Really everyone, evolve or die, it’s as simple as that.


iPhone SDK NDA Lifted Really?

Posted: December 26th, 2008 | Author: | Filed under: iPhone, Uncategorized | Tags: | No Comments »

iPhone SDK NDA Lifted Really?

Picture of IrvinI am not sure what the entire NDA lifting really means. It is hard for me to figure out what I can and can not say. I assume that I still can’t talk about anything having to do with the experience of the process, but I can discuss features and here is where it gets a little mirky, the code that I wrote? The problem with discussing the code is that if I talk about the code, I have to talk about the SDK, and I am still not sure that I am free to discuss it.

Also, are people who haven’t released apps able to discuss their techniques and tips anyway as Cocoa developers who have dabbled with the SDK. Furthermore, can people who don’t have released apps write books about how to write software for the iPhone.

Unfortunately, it seems that I have more questions than before about what it is OK to talk about and not. Before it was easy, the first rule of iPhone development, is we don’t talk about iPhone development. But now not so much.


An Open Android Will Kill a Closed iPhone?

Posted: December 25th, 2008 | Author: | Filed under: iPhone, Uncategorized | Tags: | No Comments »

An Open Android Will Kill a Closed iPhone?

Picture of IrvinThere has been much talk over the past few weeks about T-Mobile and Google’s Android phone, the G1. Unfortunately most of the debate hasn’t really been about the merits of one software stack over the other, or about the hardware differences between the two. I haven’t really seen it mentioned that the G1 may allow developers to create more interesting applications because it has 192 MB of RAM, or that the iPhone allows for better RPGs because the developers know that all of the iPhone subscribers have an absolute minimum of 4 GB instead of the 1 GB of solid-state storage that Android ships with. No, instead the debate seems to be around Apple’s assertion of dominance over what applications are allowed on the iPhone, and Google’s “apparent” openness to any application a developer wishes to ship, and that a user wants to install.

A couple of things about this. While Google says it won’t stop people from installing any application that they want on their Google Android phone, that doesn’t stop T-Mobile from disallowing applications on phones attached to their networks. Either Google or T-Mobile will have to implement a kill switch, similar to the iPhone, or they will terminate or suspend the user’s account if they detect the application running. The first time it happens, it will send a chilling effect into the community, as they will not have a clear idea either as to why the application was killed, or the user booted off of the network. Even if T-Mobile gives a clear reason, it is not likely to be agreed with by the developer of the application. Probably there will be some blogs citing a hidden cabal between Google and Apple to dominate the mobile market.

Also, while Google won’t stop any applications from being installed on the G1, and there will probably be multiple methods of getting an application onto it, I would be surprised to see Google being completely liberal with the applications it hosts in the Android AppStore. Google has to protect its customers as well as its servers and network just like anyone else. They have a less strong agreement with their carrier partners than Apple does, but that doesn’t necessarily mean that there is none there, or that Google will intervene in a carrier decision to not host a particular application.

So while people will be able to open-source their code from day one if they so desire, and they will be able to easily hack applications onto their devices, at the end of the day, the carrier still has the ability and right to boot either the application or the customer off of the network. The only recourse would be to switch carriers, which can be somewhat painful, especially if there is a contract involved.

Being first Apple has had to tackle these issues prior to anyone else laying down a blueprint. Now Apple has clearly created an example to follow in some ways, and not to follow in others. I am indeed defending Apple because I feel that the critics have been far too harsh. If you look at it, AT&T is already having trouble with just the 3G traffic from the iPhone’s browser, what do you think will happen if everyone started tethering and turned off their home broadband service. Their network would come to a grinding halt. If they built out the network to support this behavior, then they would no longer be profitable at an acceptable level to their shareholders.

The “I am rich” application needed to be removed, that can be debated, but the arguments defy the common sense, Ocham’s razor logic to Apple’s position.

Finally, we get to podcaster, which would have been an awesome application, and I actually can’t defend Apple’s position here, unless, and I suspect that it isn’t, Apple’s position, I think this application would slaughter AT&T’s 3G network. They won’t even let us download music from the mobile iTunes store over 3G or EDGE. If you think about it for a second, why would Apple not want people to buy when they were on 3G or EDGE, money is money.

Clearly AT&T is playing a role in shaping what we can, and can not do on their networks with whatever device we choose. When Android devices begin shipping for Android, we will see similar restrictions from AT&T. They may take another form, but they will be restrictions nonetheless. It is important to remember that we are dealing with two companies, not just one. Heap the blame on both of them, not just Apple.


Ads in iPhone Native Apps

Posted: December 23rd, 2008 | Author: | Filed under: iPhone, Uncategorized | Tags: | No Comments »

Ads in iPhone Native Apps

Picture of IrvinI have what could be considered a strong anti-ad bias against iPhone applications with ads in them. But really my concern isn’t against the ads themselves, but more about the fact that some software, whose purpose is to market to me is in a device that has always on network connectivity and access to my phone book.

My concern is always to protect my friends from unwanted solicitation, however that is what all of the companies that want to “leverage the social graph” are trying to do. The iPhone is the perfect device to allow violation of my friends’ privacy. Furthermore, I don’t really want to have to worry about what software my friends have on their iPhone before I give them my telephone number. I already have one phone number that is difficult to remember for the people that I want to remain in contact with, and another one that I use to fill out forms that I only answer occasionally.

I am not against these companies being able to sell their applications, or rather, give them away for free, but what I would like to see is either a privacy policy on any application that accesses the phone book, or at minimum a disclosure that they do. Actually, as far as I am concerned, Apple can take the warning off of the GPS access, and put it onto the phone book access since it is far more important than where I am. I mean, anyone can see where I am, but not anyone can see into my phone book.

I would be happy to pay a fair amount for an application like the bloomberg app, but once they put ads into it, I’m done with it. If companies were smart, they would offer both an ad supported version, as well as a paid version like twitterific.