Monday, December 21, 2015

Not looking good

Ok. A day before my travel I was working on my Thinkpad and it kind of dawned on me why I stopped using Windows as my main operating system way back when dinosaurs roamed, well, ok, not that long time ago.

First, the machine worked for all purposes, execpt for quite a few things. While downloading updates, it just got stuck at 23% for 2 hours, no matter what I did, sign off, reboots and whatever else, nothing moved the update progress bar, not even when it tried again, it got stuck at 23%.

When you click the START button, you can just type in whatever you want, and it is way faster than actually trying to find things, but every single search results resulted in a non working link. Pressing the Add remove software from the menu resulted in the machine just stalling for a minute or two, then nothing happened.

Going into the Control panel or settings resulted in the same thing.

There was nothing that caught my eye in the event viewer.

It kind of looks like the machine is toast, except for, I could install and download applications, both from the store and from other web sites, the web worked quite well, opening files from network drives worked, Netflix worked, everything seemed to work but really it wasn't.

So, I did not take the Thinkpad with me on my travel. How this will affect my transition trial remains to be seen, but things is not looking good. This like the moment when a scientist calls success on his experiment a minute before it blows up.

I was looking forward to actually doing work on Windows only vacation for 2 weeks. This really puts a huge downer on the experiment, and things were looking so good.

Friday, December 18, 2015

Nearing conclusions

The title of this post was supposed to be called "Wet towels do work after all", and I meant that using Windows was like trying to dry yourself with a wet towel, when you are in a swimming place, you drop the towel on the floor and it gets cold and wet. You can still dry yourself, but it just isn't comfortable, things just don't work quite perfect, but they do work.

That was almost my conclusion about windows 10. Here are some negative feelings.

- There are so many ways of doing things. You have pc settings and control panel to change settings, then you right click on the desktop and go into display settings, there you can change the size and patterns of windows, screen sizes and even some layout. Things are just spread all over the place. Then the oldie but gold Control Panel, it is almost impossible to find anything there, if it were not for the excellent search function inside the control panel, it would be completely impossible. Things move around between operating system upgrades. This things is a huge wart in the face of modern operating system.

- Cygwin works, ye sit works, just not always the way you are used to. You have to install scripts to get the apt-get kind of feeling, but that does not work all the time, you just can't find everything. I needed a specific xml library, then I restarted the Cygwin installer and was able to find the library I needed, apparently this is the way to do things, re-run the installer. That just doesn't feel right. trying to setup Cygwin with Git, Zshell, oh my zshell and others is difficult, even for a veteran Unix administrator. But when you run services that have a prompt, like node, mongo or redis-cli just to name 3 items, as that is the rule, you always have to name 3 items. The prompt does not work, doesn't show up, you can type but you can't press ctrl-r to do recursive search through history and things like that, things you take for granted. Weird thing is, the prompts work in CMD terminal, MinGW shell that came with Git and in powershell, which tells me this has to be some simple thing, please fix. Why don't I just use MinGW that came with Git, because more things break there and there are more issues with that shell, would have been great if it worked.

- When you task switch over to a window, it does not switch to that application. Ok, this point is just me, it did take me some time to get used to the opposite when I moved to the Mac, and when you use something for 12-13 years, you kind of get the feeling that this just has to be the right way. Well, I do think this has to be the right way. My usual work environment is that I have two cygwin windows up and running, each taking half of the display, one is just for running the web application and the other one is for doing searches like ack, grep through the source code, is a window for git and committing and logging and plain just terminal for the source code. So when I switch over to Cygwin, I just get one window, and it takes quite a number of alt-tabbing to get the other one. This is not a fatal flaw, but it is a wet towel, extremely annyoing and there is no way to just jump to an application and all its windows.

- I know I said 3 items are the rule, well, 4 items will proof my point. No other filesystem support. Oh boy would  this be fantastic. I kind of like ntfs, but that is surely just because I have used it for over 20 years. But we live in 2015. We should have ZFS or something like that. I love ZFS so much, I use it on linux, on FreeBSD, of course on Solaris but I don't use solaris today unfortunately because of lousy hardware support AND on my Mac. Yes, I have ZFS on my mac. ZFS is very cool. Just a quick thing. I can create a partition that is encrypted, a partition where the same byte is not written twice, so if you have 2 copies of a file, it is just stored once, I can set resource properties, like max size and many others, I can mirror filesystems and even have a filesystem as a blob that you can f.ex. export as an iSCSI disk. Of course not everything is supported by Windows, probably can't be, but having something like that would make windows awesome.

Ok, enough is enough. Why did I change the title of this post ? Why isn't it negative ?

Well, one word, babun (http://babun.github.io). Huh ? Babun ? What is that ? Well let me give you the short explanation. Babun is a clone/fork of Cygwin with everything you want and need. It has oh myzshell, ZSH as default, it has its own package system, just badun install this and that. It works great, it is very fast, and it works 95% as well as the Mac Terminal, why 95% ? Because it does not display prompts for node, mongo and redis-cli, why not ?

I have been playing with Raspberry PI2 quite a lot lately, been writing many sd card, info to sd cards. The Mac is just a a joke when it comes to writing images on things, even back when to a DVD disk. It is so slow. Just to give you an example, I wrote Raspbian debian for Raspberry onto an sd card with dd command and it took so long time that I went to the store and to the gym, trained for an hour and when I came home it still had not finished. Yes I know I write to /dev/rdisk... it is so slow. Just for the fun of it, I did the exact same with dd inside Badun and wrote to the f drive, it took just a few minutes, it was blazing fast. WHAT ?

The search feature on the new start button is just so fast, it is amazing. It can't send email or search for contacts, but you can search for files, applications, games, settings, properties and even just type in a help question which it will search the net for you. I don't have cortana. But this works very well.

Working on net drives. I have a home made SAN at home, plenty of disks and plenty of space. Working with the Mac on these drives is a real hit or miss. When the Mac works, it works great and over a gig ethernet, I get really great speeds, but change over to wifi and it will take you many minutes to get that disk back, open files lock down and things just go wrong, then things can and will get super slow and there is nothing you can do about it. Well working with samba shares on the windows machine is super great, switch to a wifi, no problems, loose all network for a moment, no problems, get the connection again and nothing has happened, now we are talking.

So, where do I stand ?

I own a Macbook, fully loaded, and due to strong dollar and weak norwegian krona, I can sell it 2 years later for more money than I paid for it, I paid 19.900 kr, it costs 27.000 today. Looking at the market of PC machines, their prices have risen quite dramatically as well. So as a replacement machine for my Macbook would set me back at least 25.000 kr ($2200-2400). That is an awful lot of money.

BUT

Yes, there is always a but, and here there are many butts.
My Macbook is as it is. It has 500 GB SSD disk and 16 GB memory. I can't change anything on it.

At work I have two machines. My Thinkpad test machine and my work machine a 13" i7 16GB 512GB SSD Macbook pro retina.

These two machines are almost identical when it comes to specs, except the Macbook has way better and higher res monitor. But as I said, I almost never work on that monitor, so it is not an issue.
They have the same amount of memory, disks and cpu.
But the Thinkpad feels much faster, way way faster. I also removed the DVD drive and set in a bracket and a 2TB disk, so I have 2 disks, do that on a Mac. I must agree that I probably can't expand the memory any more than 16GB, but I don't need to. When I am working on the Thinkpad, I am using like 2-3GB memory, thats it. I know very well that the memory free is a nonsense on the Mac as the operating system claims most memory to speed up work and caching, so you never really run out of memory.
My Thinkpad is much faster at everything than my 13" Macbook and the Thinkpad never just stops for no apparent reason. I have not tried any games on the Thinkpad, will do that over christmas probably, but running games on the 13" Macbook is not possible, they just run slowly and skip all frames, not possible.

Then there is one last thing. I have been in the Apple world for 12-13 years. I use iCloud, I use Messages and I use iTunes Music. I have to say that iTunes Music is worse than Spotify, way worse. It is slow to start, doesn't just download everything, so the next song sometimes needs to wait until your train is out of the tunnel, and even when playing your own music the network spinner is spinning constantly. Why do I then use it ? Well my kids are all into music and love listening to music, and I just pay like 150 kr a month for the whole family, instead of paying 99 kr per person, this adds up quickly. If spotify could match this, I would probably move over.
But on Windows 10, there is this thing called Groovy, yeah I know it is groovy, people stopped saying groovy in the early 1960s. But the client is quite good actually after a limited try. I just copied my iTunes library to a net drive and pointed Groovy to that directory and it not only scanned all my music, it added album covers, even on Icelandic songs, so I checked the groovy subscription service, it does have Icelandic music as well in there, though all I need is early Bubbi and Todmobile and I am happy.
I have not checked out prices or OSX clients, but I will also check that during christmas vacation. It seems on first check to contain the same music as Spotify and iTunes Music.
It all remains to be seen.

I am not quite jumping ship yet, but my attitude has become much more positive. I can see myself though using Windows 10 and doing my work on it. The 15" Macbook pro retina has though spoiled me so much. It has raised my standards to so much height that it is almost unthinkable to use anything else, and the battery life ? Ohhh the battery life is so good on both Macbooks and not so good on the Thinkpad, but is it good enough ? Well, we shall see. Over christmas I will travel to that icy rock in the middle of the Atlantic ocean, I will only bring with me the work 13" Macbook and my Thinkpad, no 15" retina machine. My work machine will remain private free, no private crap on it unless everything else fails, all private work and doodling and programming will happen on Thinkpad. This will do for 2 weeks and we shall see. I will checkout Groovy while I am at it and I will write a post about this.
This is a process, be patient.

Thursday, October 22, 2015

Moving to windows 10 from OS X? Ongoing experiment

I wrote earlier about the possibilities of using Windows instead of doing OS X. Well life got in the way of doing quick results, busy at work, busy with kids and family, but a few weeks later, here I am and I am bearing some results.

My premise of the experiment was to see if I could start to use Windows machine as my main machine instead of using a Mac. I work as a web developer, deep with Linux servers and most of the latest cool kids toys, Go, NodeJS, Python, NoSQL with Redis and MongoDB.

Well besides my day to day work, I have a side project that is starting to become huge, I wrote from scratch a travel management system for Discover.is, go have a look.

This system uses Python tornado web server, nginx, redis, mongo and a number of libraries. It is running on a Linux server. My main goal IS NOT TO get the site it self running on Windows in production, I will never do that (I know, never say never). My goal is to see if I can develop, debug and run the service on windows without using a virtual machine.

Well, today I am here to say, YES, yes you can do that. Of course you can't do this out of the box, but you can't do any windows development out of the box, it does not come with any such tools, you have to fetch them all by your self. This isn't a good thing.

So I fetched and installed Go, Python, Mongodb and Redis. I found easy way to get mongodb and redis to run as windows services, so I don't have to manually start them, but that would have been an option if needed. Once I had python installed, I installed pip, the python package manager and virtual env with setup tools, both python packages.

Well, the cmd.exe is quite bad, especially after being a unix geek for so long, copy paste among other things. I installed Cygwin and apt-cyg tool. Through Cygwin I installed Gnu C++, Git, automake, make and other developer tools and libraries, they even had libxml and libyaml. Cygwin has ssh, so setting up ssh was easy and I had Git up and running. Pretty much everything that is in the build-essentials on Ubuntu.

Little by little I had everything running, my website eventually started from inside Cygwin, and from Microsoft edge, http://localhost:8000 started. I had everything. It was easy to get my dummy data into mongo, edit my hosts file and I was running. This took me a few hours, all in all.

But an experiment is worth nothing if you can't reproduce it, right ?

In walks Thinkpad T430s. Clean installed Windows 10, patches. And then I re-do everything. Install Cygwin and check out my code, it works. I had done it now, under 1 hour.

Now, in theory, I can go to any electronic shop and buy some cheap HP machine and have it up and running for 1/4th the cost, at least of a high end Mac, and 1/2 of the price of a decent mac.

Things are not as good as they are on the Mac. Not as smooth. But I manage and learn new tricks. I can't put my finger on it fully and of course Windows machine will not work the same as a Mac, and I am not trying to. I am not remapping keys or changing layout. I would say things are close, 80% perhaps. Some things like moving and scaling windows and apps from keyboard are extremely cool and only possible on a Mac with 3rd party support.

Now the question is, is 80% good enough ? Will I get used to using windows and learn the quirks and ins and outs of it ? Yes I am sure I will.

Just today, I made some changes in the code, a pretty large change, tested, debugged and put into production, all from my windows machine. No matter if it is my game machine or if it is my Thinkpad.

This is pretty cool, yes it is.

Why am I doing this ?

I really don't have an answer. There are a few things that bother me with the Apple system. Their locked down computers, not the operating system, but the machines themselves.. I am fine with how locked down the iPad is, although it is infuriating to put a movie on it just before going on a road trip with the kids. I have no objections to the new MacBook with its 1 port. But I have an issue with changing a PRO machine into something that is locked down. I don't want to buy a machine for $2500 that I can't swap out the hard disk or extend the memory. I don't want to buy a new machine to get a 1TB ssd disk. And then there is the app fanboyism. That someone spends a year doing the design of a note taking app and twitter clients, just the look and comparing all apps to it. It doesn't take much to write a twitter client, it is actually easy, so how can you spend a year doing the client ?

And the client is so slow, speed and usefulness is not valued, just looks and animations. I think that is just so wrong. Looking at the Mac App store, you see plenty of 0 (zero) star reviews that state though the app is great, it just looks bad. That's just stupid. Of course I am not advocating that an app should have pink background and cyan color letters, it should look good, but it should be speedy. We have computers that are million times faster than the faster machines in 2000 and they made Jurassic park and Terminator 2 back then on those machines. Things should be fast and not crash because a bitmap background is using megabytes of memory. Everyone that disagrees with it gets flogged. There are sites on the network where "ugly" apps are put up and shamed, they get thousands of users and twitter posts. That is just bullying, most of these apps are made by first time programmers and teenagers.

There is no one there saying, this is how you should do this, there is no one there to assist. No, no one has shamed me, yet. I think Apple is going in the wrong direction with the OS X and Mac Pro machines, (Macpro and MacBook Pro). Let the pro people tinker with their machines. I can put 3 hard disks inside a normal Thinkpad. When you need to do it, you know why. When you buy a machine for your wife with 8 MB memory and find out that you really wanted 16GB, you can't do it yourself you have to sell the machine and buy a new one, on a thinkpad you can.
My Game machine has 8 disks in it, yes I use them all, because I can. I can't have a Mac pro machine that I can do this with.

Tuesday, April 7, 2015

iPhone 6+ battery woes and the internet is wrong

A little break in my testing to see if I can become a Windows user after 12 years being a Mac user and for the whole time being almost Windows free, meaning, I never turned on a windows machine I did not want to, and mostly to play games, though I did keep up.

More on that later.

On the iPhone, you can go into Settings -> Usage -> Battery Usage and you see how long you have used your phone and how long it has been idle. Normal case is probably 4-5 hours usage and 13-15 hours idle.

Now for the last few months I have been almost equal, that is my phone usage has been almost the same as the idle use. So on the iPhone 6+ with its extensive extra battery size, I was almost out of juice when I went to bed, if this had been the case with iPhone 5s, I would have been out of juice 3-4 o'clock.

What did this mean ? This meant my phone was being used constantly even though I wasn't using it. Being an experienced computer user, I went in to investigate, but forgot to take screenshots, damn. I quickly saw that the battery shamer, where you have a list of apps and how much battery they were using was wrong. It listed Facebook as the main culprit with sometimes 50-60% battery usage.

When I plugged in the phone and launched Xcode and Instruments, I could see that Springboard and Backboard had high cpu usage, especially Backboard. But why ?

Now I entered a weeks worth of search engine searching. I went everywhere and back. I followed every advice. I removed quite a lot of apps, turned off location, background and other settings, and things seemed to become worse.

Then I thought to myself, hey, I have been using this image on the phone since I purchased my iPhone 3 back when it came out, and just updated it. So in iTunes, I decided to set up my device as new device. Completely clean, I thought. I only installed Overcast, no other 3rd party app, no twitter, no facebook. Did this solve my issue ? Nope. My phone was out of battery by supper and running on fumes unless I received a few emails, it would die.

Even turning on Airplane mode did nothing. Sometimes the battery would drop 1% every 10 seconds, which means you watched your phone drain. There was only iCloud and Overcast (5-6 podcast I monitor).

I turned off iCloud, which meant I had a feature phone with a podcast app, not even music or books were synced. NOTHING.

I reset the phone a few times to factory settings, did restore, did setup a new device, even set it up with my wife's settings, no luck.

I sent the phone in for a repair. This would not be the first iPhone I had with a faulty battery, those things happen. But that time when my iPhone 5 (not s) had a faulty battery, it was different. It just jumped from 80% battery down to 10% just like that, nothing in between, and the 10% did not last at all. Now my iPhone 6+ just drained right in front of me.

I got it back from repair saying there was nothing wrong with the hardware.

I wasn't happy. I was even so unhappy with this, I think my "moving to windows" started around that time, and that is being unhappy.

Well, at least I knew this wasn't the hardware, and that is something. I knew this wasn't Safari or Facebook as I did not turn those apps on once in my day test.

Then I decided to test one thing, as a last resort, and if it did not work, I would go out and purchase Windows Lumia 930 phone. Those were the stakes. During the repair period, I used my iPhone 5, not the 5s as that is my wife's phone now. To my complete surprise, the 5 worked fantastically well. The battery worked all day and then some, it was quick, and in short, it was excellent, but too small. I have gotten used to iPhone 6+.

The final straw was logging into my apple developer account and fetching a new iPhone image completely. I manually forced the image onto my phone, setup my phone as a new device, and just like that, around supper time, my phone has 60-70% battery left, sometimes even more.

Monday, March 16, 2015

Migrate from Mac to Windows ?

Migrate to Windows ? Did I eat something ? Why go against the current ?

;tldr Begin

I am considering, for real, moving over to Windows from Mac. I have been an avid OSX user since 2003 and even made good living off writing iOS software. Now since I mainly do Web development. Is it possible ? Can you use windows even though you are not doing any Windows work ? (not dotNET programming or java).

;tldr End.


I searched long and hard for blog posts about this subject, and I did not find any except for one guy who is a photographer. All developers were running as fast as they can towards a new Mac, very few were moving full time to Linux. I am a huge fan of Linux. I have been using Linux in one form or another since well before version 1.0 came out. In 1999 I moved away from all products coming from Redmond. Before that I was a Delphi programmer and Windows System Administrator for a few years. In 2000 I was a full time Linux system administrator and stayed there until 2007. I am a RHCE (Redhat certified engineer). I purchased a Mac, Powerbook 17" in 2003, gave up on Windows XP. I had given up on getting Linux on the desktop, even though every year since 2001 to 2010 was the year Linux takes over the desktop, and it never did.  I started learning some Cocoa programming, and development was fun again.  In 2007 the iPhone came out and changed everything.

Now, in 2015, I have been doing Web development as full time employment for a few years. iOS development became a bit tired, as the only thing I was doing was fetching and posting JSON data on a webserver and trying to make everything look good. After more than 20 apps that are almost identical, I decided to try web development for full time. My tools include Python Tornado, Redis, MongoDB, Javascript and such tools, lately I have been doing most new programming in GO. So, non Mac development.

So after I purchased a computer for 23.000 nokr (Norwegian kroner) (about $2.800), and using ViM as an editor, python, GO and mongo for over a year, not even starting Xcode twice in a year, it made me think. It is pretty expensive to have a computer for 2 years that basically cost you 1.000 nok ($120) every month to own, then go through the process of selling it and then paying a huge sum to get a new computer. Since 2003, I had only owned 17" Powerbook/Macbook pro. I also looked at some of the other machines that could have 2 hard disks, higher res screens, more ports with a bit of an envy. When Apple stopped making the 17", I had to get the 15" retina one. Of course I really like the machine, but the retina screen is almost never used as I have the machine either hooked up to 2 crappy monitors or a 27" cinema display. The 512 GB disk gets full very quickly. The hardware is much more limited now and the retina screen is not a selling point, at all. It is nice, but thats about it.

And I use almost no Mac software. I stay in the terminal all day, with ViM, git and other command line tools. So I started thinking about cheaper solutions.

My current work gave me a Thinkpad, T430s when I started. I put it in a drawer and got permission to use my Mac at work. But a few months ago, I stopped carrying the Mac and started using the Thinkpad with Linux installed. Using Linux on the desktop is not a good experience, and I started using i3 as a windows manager, it is quite good. The machine it self is also quite a lot worse machine than my Mac, but it is quite usable, meaning, I can do my job very well on it, and it does not hold me back, really. There are things I am much quicker at on my Mac, but all in all, it works. My biggest grieve is Linux. Of course my web app runs on linux, and I use virtual machines and so forth. That got me thinking. Could I migrate over to Windows ?

In short, yes, yes I can.

I have not really used Windows since 1999. I had begrudgingly used Windows through the years, but not much.

So, I will be posting a few more posts, looking into if it is possible to make a Windows machine as good or even better development machine than a Mac. It has to be at least as good for me to even consider it.

Microsoft Surface RT and my family

I love my Surface RT most of all my computers and gadgets.

My Surface does everything I want from a tablet and much more. I have full access to the file system, I can mount network drives, I can use a file in one program, and then finish it in another. There is no limit on the machine except for one very brain dead lock that all apps must come from the Microsoft Store. But the same lock and many more are on the Android and iPad. The screen on the Surface is awesome. reading books, watching videos, doing work over ssh, email and web browsing is fantastic. And with the split screen function it becomes totally the best tablet on the market. Just think having Skype or a music player using 1/3 of the screen and your browser or other work uses 2/3. As the screen is quite wide, this works spectacularly well. The machine is actually quite fast. It does everything I want it to do and does it well. And it also has some excellent games. Games like Asphalt and others. Just plug in a USB controller using straight up standard USB port, and it just works. WHo would have thought that Microsoft obeyed and used standards ?

The Netflix client is awesome and really shows why Netflix is such a success.

All in all, my gateway into thinking about Windows, something I have disliked since Windows 2000, is a machine I purchased just because I was curious, and got it very cheap as a B product.

I have two daughters, aged 10 and 8 (this year). My wife and I decided to buy them their first laptops. I ended up getting Thinkpads X201 for very little money. They were good, fast and had a future, unlike my Surface. Had the surface had a solid future, my daughters would have gotten them. I installed Windows 8.1 on these machines, and put on the built in family plan and parental protection, and it works, and works great.

They can use all my software I have bought on the MS Store, I also get a report sent to my email about their usage without snooping. They also know I get this report. This just worked so well. I know the Mac has a family share, but they just recently started offering it and it isn't as solid.

Then at the same time, cracks in my apple usage started to appear. My wife's laptop hard disk is full, and it is full of family pictures, so no, delete is not an option. 256 GB disk wasn't enough. My own 512GB disk is filling up quite fast. And there is nothing I can do about it. There is no way to increase this. My work computer, the thinkpad T430s has no such problems. Replacing the disk in it is just 1 screw, pop out and pop a new one in. Adding memory is just as easy. And now here comes the kicker. By popping out the DVD drive with a click of a button, I can put in a second disk, any disk on the market. You can get 1-2 TB disk, or an SSD disk. And better yet, you can add a card in it with an mSATA disk. So you can have 3 disks, and you can get these extensions from anywhere.

So, Windows is kind of winning me over. They (Microsoft) are really trying and running on all cylinders. I think Windows 8 is great, and windows 10 will be even better,

Am I loosing it ?