milkbox .net

11Feb/101

From Linux to Windows 7

I've done it maybe...

I am currently waiting patiently for Apple to release their new MacBook Pro line using a new i5 or i7 processor and then it's my intent to snatch one up as my new permanent computer. Check.

Well, besides liking most Apple software and software created for OSX I have grown especially fond of iTunes, mainly because I want to sync my iPhone everynight and snatch the newest podcasts i'm subscribed to. OK, I could do this in Linux but if you've ever used any of that stuff, it's reverse engineered and it's not real reliable. Besides, iTunes is a pretty great music manager.

Regardless, I decided that until that time comes I want to see where Windows is at and how well I can adapt to it from my Linux lifestyle. For about the last 10+ years I've used Linux 99% of my time and it's been great. Love command lines, love compilers, love the software (for the most part, I'm looking at you browsers and flash!). But it's just not as refined...

Well, let me tell you something. Windows software (at least the free stuff) is not that refined either. It's pretty good, and much better than what it was. I'm going to outline some major things that I need to do and how I'm handling it in Windows 7.

Terminal

Windows now includes "Power Shell" which is a glorified terminal. By default they did a good job of creating commands that relate to UNIX/Linux style commands (ls, cd, rm, etc.). The downfall of this is that they are aliases to .NET commands! Basically what PowerShell boils down to is a .NET command interface. Kinda like how you'd run python and get a Python shell. It works so far.

On a side-note. There are environment variables but they are a bit harder to define. You have to edit the environment variables for a user and when you start a new shell they will have updated. There are probably easier ways to do this (I know you can do setx) but using the GUI seems to work pretty easily and a little quicker than trying to type out the settings. If you screw it up there isn't as easy of a way to correct it.

Also, there is an idea of a .bashrc (shell startup file) but it's not very convenient. I don't remember the link offhand and you have to enable script running for unsigned scripts.

SSH

Thank you Putty. I installed Pageant, Putty, and Plink. Plink lets me ssh in the PowerShell but that doesn't work too well because PowerShell doesn't handle the color escapes from bash. But it works well enough. Pageant handles my private key authentication. I have it run at startup (simple shortcut in the startup folder) and mainly use Putty to connect remotely and forward my SSH key. Works very solid. Somewhat is annoying to have to use another program for this, and not be able to do it from the command line.

Editor (VIM)

I used vim in Linux and there is a nice build for Windows. Installs nicely. Overall it works good. I was able to get all my settings ported over quickly (after figuring out where they go: $HOME/_vimrc). One nice thing is you can update the shell environment variables and then vim and gvim can be used from the powershell just like in Linux and all seems fairly kosher.

Version Control

GIT has a windows client that has been working for me. It's command line only and It seems a janky as it wouldn't let me use putty as the ssh backend but it has a compiled version of OpenSSH client that it falls back on. I believe it might have something to do with my using a color terminal on the host that has my git repositories.

Subversion has always had a program that integrates with Explorer nicely called TortoiseSVN that works great. I am tempted to move away from GIT. I believe that even Mecurial and Bazaar have Windows clients, not sure though.

Python

Python was a bit trickier. I downloaded the 64-bit version and it worked pretty well except that some libraries (numpy) require some compilation. The problem is that by default Windows 7 doesn't come with a compiler. There are two solutions. 1. Download Microsoft Visual Studio Express Edition and Microsoft SDK for Windows. 2. Download third-party pre-compiled versions of the libraries. I did (1) initially and found out that by default VS Express Edition doesn't include a 64-bit compiler, you have to download the Windows SDK to get that. Well, I eventually just decided on downloading the third-party compilations from here thanks to Christoph Gohlke. He did the heavy lifting of building these packages.

As a side note, there does seem to be a package for distutils which allows you to use 'easy_install' to install Python packages. The package includes the 64-bit build but uses a 32-bit installer which looks at a bad registry entry to find the location of Python. I fixed this by duplicating one registry entry (I'll have to update this later to say where) and it installed and runs fine.

MySQL

Install is easy, but default table type is InnoDB which is different from Linux which was defaulting to MyISAM. I ended up having to run a PowerShell as an administrator and then editing the my.ini file which lives in the MySQL install directory (somewhere under _C:\Program Files_). This just caused some problems with Django because I imported some old tables and then built some new ones and the constraints didn't want to work because of differences in table types.

Django

There is a package which I didn't use called "Instant Django" so you may wanna check that out. For this one I actually used distutils and just ran

python C:\python26\Scripts\easy_install.py install django

and that took care of everything. If you've setup Django on Linux before it can be tricky but it's not any trickier on Windows.

That's about all I've run into right now. Seems are working and I'm fairly happy. Not because I think Linux is bad or Windows is good. It's just different and a decently exciting experience. Web browsing seems faster and a bit more stable. So far so good.

11Feb/103

Can I chime in on the iPad now?

There is a lot of media attention for the iPad that you can see just by googling iPad. I just want to say that I am excited. I am pushing Tara to get one. Why? BECAUSE IT'S PERFECT FOR HER. I want my mother to get one too!

I have been using Windows 7 now (more on that in another post) and I have to admit, I don't trust it one bit. I do trust Apple's approval process. All the "bad" press about the App store has made me think, "OK, here is a company that is validating the software that I'm going to run on the computer." This is great. Why? Because everyone and their brother is going to write software for this thing, so everything will be available and you'll know that people took the time to make it worth a damn because they knew they had to go through the process. Let me see, software available for everything I need to do and it's good and I don't have to search around the internet a bunch to find it? True, True, True. Man, if windows software was as cheap and easy to find and not a total piece of crap when I bought it, that would be great for me.

I was just thinking last night and today how much I love my iPhone. And I don't think of it like a phone. I think of it as something that is a portable tool for me to use. My dad carries a pocket knife around with him. I carry an iPhone. Mine may give me leg cancer though.

Why is everyone harping on Apple anyways? People calling them "closed" and all this crap. A recent article by the WSJ suggested Apple is the next Microsoft. Let me suggest one flaw in this argument: Apple doesn't say that one technology is stupid (Java) then replace it by a proprietary one (C#). The argument here being Flash which if you ask anyone who develops for flash, it's a travesty. Ridding the world of flash and pushing Javascript and HTML5 helps Linux users, helps WIndows, and yes, helps Mac users too. And I'm not saying Javascript is better or HTML5 is the savior but it's at least doing something different. Flash has not been going anywhere. I agree with Steve Jobs: Adobe is Lazy.

8Jan/106

Is Apple Playing the Startup Game?

What would be the easiest way to keep a secret about an upcoming device?  The device not to exist!

I recently read an article by Paul Graham, What Startups Are Really Like and he notes that one of the suggestions is to release early and get customer feedback.  What if you didn't even have to release?

For a second lets think about what happened with the iPhone.  There was a lot of speculation before January 2007, and then iPhone came to MacWorld with a magical device that no one had seen before and didn't even have them ready for release until June 2007.  Even then they ran out.  I don't have a clear history of the time before January 2007 because I didn't pay attention to Apple news back then but I imagine it's very similar to the rumors and speculation that has been flooding the Mac community since early December.

Lets say Apple decided in October / November that the technology was ready for an Apple phone.  Rumors started to spread but initially trickled.  As Apple is designing hardware they put out different little bits of rumors here and there, parts manufacturers let it slip that Apple is buying parts, patents starting making headlines etc., but Apple at this point has no actual phone.  And then what does Apple do?  It listens.  It puts it's collective ears to the track and starts hearing what people are speculating about.  Gathering ideas?  In December they start developing a weak layer of software and hardware to support it, ready for January of 2007.  Think about it.  Apple didn't have to even give people hands-on demos or anything.  I'm not saying they hadn't tested the feasibility of the device, I just think as far as features go, the community fed them to Apple.  All they had to do was simply show a thin layer of design for key features on this magical mystery device.  As long as they could commit to their promises, it didn't have to even be ready for release.  Remember that even in June they hadn't manufactured enough to meet demand.  The first OS for the original iPhone wasn't that feature-full, but it met speculations and was executed well!  Six months is plenty of time for a company with Apple's level of resources to develop the software for the phone they promised in January.  Interesting enough, the 3G was a completely new, more compact, design which even included a 3G radio, leading me to believe the initial hardware design was done in a bit of haste (where they didn't consider that the metal backing of the original iPhone affecting radio signal strength).  To their credit, excellent execution.

As for an upcoming tablet-like device, they don't necessarily even have this new device in hand right now.  There are tidbits that say "You will be very surprised how you interact with the new tablet," and it doesn't take much for people to run with that idea and come up with even newer ideas.  They could be working on it as I type this and implementing key features that experts and the community are saying the device needs to beat the competition.  Doesn't anyone else think it's weird that they could keep such secrets?  Steve Jobs couldn't even keep his health problems a secret.  There is just no secret to keep!  It's also interesting their event is now two weeks after CES where the competition is presenting their sub-par tablet devices?  I'd say two weeks is plenty of time to implement some last-ditch ideas, especially ones you don't have to immediately release to the public.

Apple is agile and I  believe this is something they do best, and for that fact what GM does worst. And what has the entire Apple community been providing over the last month but providing excellent ideas. Why not just let the customers decide what they want and then execute their ideas?

If the device is ready for release on the 27th, this whole article is moot, but  I could still be right about the iPhone :)

EDIT: Just so this is clear.  I have been informed that there are many iterations that the iPhone went through so it wasn't a turnaround of 6months.  But it also doesn't mean they're not keeping an open ear, but this is somewhat obvious within constraints.  SDK was a request from the users, but maybe it was always planned.