Showing posts with label macbook. Show all posts
Showing posts with label macbook. Show all posts

Thursday, 13 September 2012

Mac OS X -- Get Uptime, Sleep and Wake Times

As I argued before, the single most important feature of the MacBook Air is its instant-on ability. This makes it very easy and non-obtrusive to just pull it off my bag, do something very quickly and then push it back.

And yesterday, I did just that. While I was sipping my coffee at the office, I wanted to quickly check some code I have written the previous evening. So I turned the MacBook on, in a few seconds had Xcode  up and running and a few minutes later I finished doing the checks I wanted to. Then I returned to the coffee and a chat with my colleagues, leaving the Air on my desk.

A few hours later, I put the computer into my backpack not even realising it is still turned on (as it turned out, it was in sleep mode). I figured out what happened just this morning when I was greeted by a warning message that my external drive wasn't properly ejected.

Ooops.

Obviously, putting a sleeping laptop in a case or a bag is not a big deal and many people are even doing this regularly, shutting down their machines only occasionally. Still, as this is not the normal way I handle my laptops, I decided I wanted to know more.

Obviously, the first thing I needed to check was how long the system was running just to make sure it was indeed on.
You do this with the good old uptime command:


'A-ha', I said to myself, so the computer was indeed running for a day (most of the time sitting in the shock-proof department of my Samsonite bag).

The next big question I had was if the computer was sleeping and for how long.
To find out the time the computer entered in sleep mode, in MacOS X (and any UNIX-like system) you use the sysctl command with the following syntax:
sysctl -a | grep sleeptime
sysctl is a powerful UNIX utility to retrieve and modify the kernel state. The sysctl -a output is more than 800 lines long (although your mileage will vary) and that's why I used grep to only output the time the kernel fell asleep:


So the computer was sleeping since 12:25 p.m. on the previous day, which is a good news. The last important piece of the puzzle was when the computer woke up. I wanted to know if something didn't wake the laptop while in the bag.
Again, sysctl -a does the job here. Instead of grep-ing for sleeptime, however, this time we grep for, wait for it, waketime.



So the MacBook effectively was sleeping for 21 hours, most of that time being zipped in the backpack.
Great.

All I had to do next was to (just in case) run a disk check with DiskUtility to ensure my volumes are in a good state.

Tuesday, 4 September 2012

The Thing I Love Most About My MacBook Air

I like many things about my MacBook Air. It's a gorgeous piece of hardware loaded with flawlessly (mostly) working software.

But the thing I really like the most is it's near-instant-on ability. It's only comparable to an iOS (or Android) device. I can pull it off my backpack, have it on and running in my lap in ten seconds and I'm ready to rock. I cannot compare this to any Windows PC or laptop I have ever had.

And I had quite a few.

Why is this important?

First and foremost, the psychological barrier for starting doing something is much lower. I might be lying on the sofa, watching a TV show, and then I can take the Air and check that PHP script I wrote earlier today. And I can do this in the ad break. When the show is back, I would simply turn the computer off (for like 5 seconds) and continue watching. Good luck doing that on a Windows based laptop.

It's just so much less distraction.

Thursday, 15 March 2012

Windows 8 on MacBook Air and Virtualbox

Earlier this week I finally decided it's time to try the new Windows 8 consumer preview. With all the hype around it, I wanted to try the new Redmond flagship product and see what it's all about from a first hand perspective.

My primary laptop I use for development is my MacBook Air (which I love, yes, thanks for asking). I have a 750 GB Hitachi external drive which hosts my photos, some other data that I need to be portable and a Windows 7 virtual machine (on Oracle's excellent VirtualBox software).

I have a pretty big C# codebase I've piled throughout the years (Orthodontic and dental software, websites, more websites and many others). A big portion of this code is within projects I am still committed to and actively support.

This is why I absolutely must be able to run Windows, Visual Studio, MS SQL Server and some other Windows-based software. My experience with Windows 7 running on a virtual machine has been virtually flawless. The system starts quickly (actually it boots faster than the Windows on my work HP quad-core laptop), feels snappy and stable. This is even more impressing given the fact that the virtual hard drive  of the machine is on the external Hitachi drive which connects to my Air through a USB 2.0 interface. Amazing. More on my Windows 7 experience here.

Because of the above, I didn't want do f*ck my Windows 7 virtual machine by running the Windows 8 setup over it. This is why I used one of the ISO setups available here.

The installation went absolutely smoothly. It took about an hour to complete (again on the external USB HDD).  If you have ever installed Windows in your life, you will not find anything problematic or surprising in the setup process. The only thing that puzzled me was the product key which was not pre-filled (maybe it is in the normal non-ISO setup). Just use one of these and you're good to go.

Desktop
Nothing really surprising here. No start button orb, a (well hidden) right-side menu triggered with a point in the upper-right corner and that's pretty much all that's on the surface.
Of course, there is probably much more than that hidden under the hood. Windows 8 is a solid upgrade to Windows 7 with the normal evolutionary security and performance improvements.

Something that perplexed me was the lack of an obvious way to shut down the machine. To power off the computer you must go to the right-side menu -> Settings -> Power. Obvious, isn't it? I guess this has something to do with tablets (you don't normally shut down a tablet quite often). Also, I suppose that if I was running this on a normal machine (and not a virtual one) the power button would do the job. Still, burying the shut down button feels strange and I am sure it will confuse lots of folks out-there

Metro
The initial Metro-based screen has some Wow! factor. It looks glossy and shiny and in my case it was pretty much identical to the one you see in the demos. Some folks had complained that the tiles had looked much differently for them but in my case, as it was a clean installation it was not the case. Of course if I were to upgrade an existing system with moderately crowded Start menu, things would have been different.

All of the pre-installed Metro apps have glitches but it's normal. They are still betas, more than six months from their release state.

Still, after the initial wow factor wears out (like five minutes later), things don't seem so shiny anymore. There are two main problems I see with Metro.

Touch Optimized

This is the obvious one. Everything in Metro is optimized to be used with touch screens. It would look and feel great on tablets. Controls are clean and big enough to be adequate click targets for fingers.

The problem? It just doesn't feel right when used with a mouse (or touchpad). After just a few minutes using this, you get tired traveling great distances with the mouse to do even the most trivial things. 
Metro apps in general have lots of white space, which is not necessarily bad in all cases but feels like a waste of pixels many times (again it would look amazing on tablets, it just doesn't fit well on desktop).

Context Switching

Now this is pretty bad. As a desktop user, I am used to do a lot of things at once. As I write this, I am simultaneously waiting for Visual Studio to compile some code (yes a lot of code) and keeping an eye on the Twitter app. A mail comes in? I would give it a brief look to see if it is something of an urgent matter and then move on.

I know I belong to a minority group here. Obviously most people prefer doing one thing at a time. Also obviously, Apple knows that and invested a great deal of effort to have seamless full-screen experience for their bundled apps in Lion.

Still, many power users, that spend their days in front of computers are in this minority camp. And Metro is bad news for those of them who prefer or are tied to using Windows.

Microsoft uses the term 'immersive' to market Metro apps. And as long as you stay within an app, it's indeed immersive. But on a desktop you rarely live in one app only.

Disagree? How many apps do you have running right now? How many tabs in the browser? See what I mean?

And in Metro you do a lot of context-switching. Want to see what that mail that just came is about? Switch. Want to take a look on your Twitter stream? Switch. A brief look on Techmeme headlines? Switch. The compilation finished? Yet another switch.

Sure, you do all those switches now as well. You do them no matter if you're on Windows or on Mac. But it is much more intrusive and time consuming in the full-screen Metro apps. You constantly dive from one immersive app to another immersive app.

Too much immersion if you ask me.

Things get even worse when the context switch is accompanied by a switch in the whole environment. Because inevitably, you will have non-Metro applications that you want to use. I don't hold my breath for a Metro Visual Studio app. Or Metro Eclipse. Or Metro Corel Draw...

And when you switch between Metro and classic apps, you are constantly tossed around between the normal familiar Windows desktop and the 'immersive' Metro thing.

I can't even describe how bad it feels after prolonged use. I. Cannot. Even. Describe.
It's bad. Period.

My prediction is that many desktop users will be confused by Windows 8. I guess 99% of the people will just skip the whole Metro thing whatsoever. And they will be constantly irritated when Metro is thrown at their face (because inevitably it is, every time you hit the Windows button or want to use the built-in mail or weather apps).

Add some more less relevant glitches (like the fact you have two completely distinct IE browsers that do not share history, cookies and all -- one that is Metro and a classic desktop IE) and you get the picture.

So Windows 8 is kind of a strange beast to me. One size doesn't always fit all. 

Thursday, 23 February 2012

A Month (or so) In the Air


It's been roughly a month since I got my MacBook Air. It's the 13" model with i7 processor and 256GB SSD drive. I am using this as my primary computer outside my day job.

During business hours I am a C# developer so I am pretty much tied in using Windows / Visual Studio for the most part of my working time. It's not that I complain, I actually like Windows 7 and find it a huge step into the right direction compared to both XP and Vista.

I have always been a heavy Windows and Linux (Red Hat and Ubuntu) user and have virtually zero experience in Mac OS X. And although I didn't anticipate any big problems, I was surprised how quickly I got used to the new environment and felt right at home in it.

In fact, it didn't really take long before catching myself trying to double-finger scroll (and in the 'wrong' direction) on my work's HP laptop touchpad. It was the same with trying to launch Mission Control and so on and so forth.

Mac OS X strikes me with how polished it feels when compared to Windows or Linux. How carefully every detail is crafted and well thought. And this is not limited to the operating system only. How do you remove a breakpoint in Xcode? You drag it outside of the sidebar. When you lift your finger, the breakpoint puffs out in a smoke cloud (with sound). I mean... you don't see this happening in Visual Studio anytime soon.

The machine feels really snappy. Boot time is around ten seconds and the shutdown takes even less. And by boot time I mean the time from when you hit the On button to the time you really can do something useful with the computer (like go to a web page or launch Xcode). Compare this to Windows, which is in a hurry to paint the desktop in front of you but then it takes another minute or so until it gets responsive and you really can do something.

There is only one thing to be said about the build quality. It's great. Period. Nothing else to see here, please move on. Thank you.

Xcode is a mixed bag. I like many things about it and I dislike many as well. At the same time I completely understand that many of the things in the latter category, I dislike simply because they lie outside of my zone of comfort. As a whole, it is a solid IDE, strange at some parts, but once you get used to it, it's OK. Again, this comes from a full-time Visual Studio user and Android enthusiast, so you should take it for what it's worth. If you ask me, I prefer Xcode to Eclipse. Did you ask? No? Uh, OK...

Cocoa / Objective-C: Weird at first if you are like me and come from a background in Java, C and C#. But once you complete the orientation tour, it actually stops feeling weird and I kinda like it. Seriously.

Conclusion: MacBook Air is a great computer that is a pure joy to use. Svelte, snappy and beautiful, I'm loving it.

Saturday, 11 February 2012

Windows 7 on MacBook Air

Joanna Stern has quite a good review on how MacBook Air lines up with the competition when it comes to running Windows.

The verdict is that the machine is good but has some glitches like inferior battery life, higher price and not-very-natural keyboard layout for the Windows user. On the positive side of course stand the top-notch build quality, great performance, superior trackpad and beautiful display.

So far I have been using my Air almost exclusively on Lion. I have installed a copy of Windows 7 on Oracle's Virtual Box software and I am impressed how well it runs (and the fact that I have created the VM on an external hard drive makes things even more impressing). And judging from what everybody else says, Virtual Box is not the best option when it comes to run a virtual machine with Mac OS X as a host.

MacBook Air is a great computer. I enjoy every single minute using it. Read the review. It's a good one.