Software Development
Perils of Updating Python on Your Mac
by Jitesh Gandhi on Jun.08, 2013, under Software Development
As part of improving my skills, I started to learn Python, a popular scritpting (it can do more) language. So the natural first step was to get it installed. Mac OS X comes with many programming languages installed. My version of OS X Lion came with Python 2.7.1. While Python 3.1.3 was also out at that time, that was not included. They are now up to 3.3.2 and it seemed to make sense to me that I should get the latest. After all, I was learning the language, right? It’s easy enough to install, but the default python (which python) remains 2.7.1. So I set out to make 3.3.2 my new default. I found a tutorial on how to do this here. Learned some good things about OS X under the hood and everything seemed fine, until I went to update Office 2011.
I had started the Office 2011 update and then let it sit there when it asked me to quit Chrome (why does Office need me to quit my browser to update?) but I had some tabs open while working on some other stuff. A couple days later, I went to finish it up and it failed. So I thought maybe it was because I let it sit there in an intermediate state. So I tried again, and again (hey Microsoft, maybe you can save the installer locally instead of downloading it every time after it fails) with no luck. I then started to look into the install log (Command+L) and saw this error:
./preinstall: ImportError: No module named ‘popen2’
popen2 is a Python module. And I realized the problem was Python 3 vs Python 2. So I restored the symbolic links in /usr/bin back to Python 2.7.1 and the update worked fine. I did still leave 3.3.2 with the other versions and added 3.3 links to /usr/bin like the 2.7 ones. This seems like Microsoft’s fault because it’s crazy to think you should never upgrade Python. At some point Apple may (or maybe already has) install 3.x as the default. But reading more, it also seems to be my fault. Making changes to /usr/bin is a bad idea in OS X.
ASP.NET, MVC and Ajax
by Jitesh Gandhi on Jul.12, 2010, under Software Development, Technology
For any developers out there who are going to develop using ASP.NET and considering using Ajax, I would strongly recommend that you learn jQuery. Microsoft bundles jQuery with Visual Studio so the library is available to you, along with some helpers to get you building Ajax enabled sites quickly. It’s a nice benefit to have, but what it exposes is limited. jQuery is capable of so much more and when you hit a wall with the limits of the Ajax.* helpers, you will find a lot of what you want to do is part of jQuery.
Books about ASP.NET are mostly going to cover the Ajax.* helpers and briefly mention jQuery. But, once you get the hang of it, you can abandon the use of the Ajax.* helpers (if you don’t, you will still be writing JavaScript to initialize and process events in more complex manners.) and build more advanced web sites with the features of jQuery.
Rebuilding a PC and J2EE Standalone
by Jitesh Gandhi on Sep.16, 2009, under Computer Hardware, Software Development, Technology
It looks like the hard drive controller also went bad on my PC. I can’t get it to boot in any way. I tried to create a bootable USB flash drive loaded with Windows XP. It worked on my laptop, but no matter what I tried on the other PC it would crash on the same driver. I tried new cables and different drives. So I think it’s just a giant paper weight. Replacement Dell main boards are quite expensive, so that was an unlikely way to go. My company offered to try and put together a temporary machine and send it out to me, but I just decided to use an old machine I have. It will only be temporary though. Looks like I’ll be getting a new PC.
So I’ve installed Windows XP and have been installing all the applications I need to get by. This takes a lot of time. Reboots, updates, configuring. I definitely need to push for a RAID 1 setup on my new machine. Storage is so cheap, an extra $100 is well worth avoiding data loss from a drive failure and having to rebuild a machine.
This brings me to J2EE. My Java IDE (IntelliJ IDEA) uses libraries to help with syntax checking, auto-complete, etc. I don’t understand why Sun does not make J2EE available as a standalone download. I have to download and install a J2EE application server to get theJ2EE JAR file. Given that, Jet Brains should bundle it with the IDE. I use Apache Tomcat as the application server and it does not require or come with J2EE.
Microsoft .Net Report Viewer with Visual Studio Express Editions
by Jitesh Gandhi on Sep.03, 2009, under Software Development, Technology
I recently was given some code written in C# and was unable to get the solution to build. I was getting the following error using Visual C# 2008 Express SP1:
The type or namespace name ‘Reporting’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)
I tried a lot of things recommended by MSFT experts on the MSDN forums to no avail. I installed the Microsoft Report Viewer 2008 SP1 Redistributable. Still couldn’t build. I couldn’t locate the library through the toolbox either. Later I found that the necessary DLLs never were installed. I tried other report viewer redistributables. I even tried getting the files from another developer and placing them in the correct location. I still could not add them through the toolbox. Some people said that I need to install Visual Web Developer. I had it installed so that did not matter. Everything I tried would not allow me to use the Microsoft.Reporting.WebForms or Microsoft.Reporting.WinForms libraries.
This is the solution I found to work and it makes sense. You need to install the SQL Server Express 2008 Runtime with Advanced Services. If you just installed any of the Visual Studio Express editions, then it automatically installed SQL Server Express 2008 Compact Edition. That is missing the reporting services and you had no option to install anything. You can install the whole thing from Microsoft’s SQL Server Express download site. Note that this will install another instance of SQL Server Express in addition to Compact (if you have it installed). It won’t upgrade it.
I found the cleanest way to do it is to install SQL Server Express 2008 Runtime with Advanced Services first and then install the VS Express editions. They will recognize that SQL Server is installed and skip SQL Server Express Compact Edition.