Tuesday, September 4, 2012

Moved

I've decided to move my blog to a self-hosted site powered by WordPress. New updates will be posted on my blog here: http://blog.alexseifert.com.

Friday, April 27, 2012

Computer Problems

The hard drive in my four year old MacBook has finally died after a struggle for life that lasted a couple of weeks. Since then I have been forced into using a borrowed PC with Windows 7 on it and ever since, I have been pulling the hair out of my head. I managed to install Cygwin which has helped ease my pains to some degree since it gives me access to a Unix-like terminal with some familiar commands. The biggest issue, however, has been trying to connect to the servers at work.

Our servers run Linux and require a SSL tunnel to access. I have not been able to find a way to connect to them in Windows that works. I've tried a couple of things including OpenSSL and stunnel, but have not yet managed to successfully connect. It is very frustrating and has cost me a lot of time.

I ordered a 1TB hard drive for my MacBook on Wednesday from Amazon and chose to have expedited shipping (shipping within 1 business day) so I would get it today. But, as usual, the postal system in the UK is unreliable. They managed to send it to the wrong depot at the wrong end of the country and as a result my shipment is now delayed. I probably won't get it until tomorrow. I am quite upset about that because I could have chosen the next cheaper option (for £3 less) and it would have arrived tomorrow. I'm going to give the Home Delivery Network a ring and let them hear about it.

Sunday, February 26, 2012

Why I use a Mac


When I tell most people that I use a Mac as a developer they have an odd reaction. They look at Macs as being more like a toy computer rather than a machine which can get any actual work done. That is especially true when it comes to development of any sort. This is, however, an old notion that seems to be long in dying.

The reasons I use a Mac are not because I am one of Apple's "fanboys" as most people who use Macs conscientiously are assumed to be. I use one for very pragmatic reasons. The first is that I really dislike Windows. It is a terrible operating system which has many problems which require constant solving and I simply don't have time for that. On top of its problems, it lacks one of the key features I use everyday: a Unix terminal. Yes, there are many programs out there which will turn the Windows command prompt into a Unix-like terminal, but I've found those are generally not as reliable or as quick as a native terminal.

Now is the point where fans of Linux will ask why I don't use Linux. I have used Linux and I used to use it before I bought a Mac. If Apple were to suddenly go out of business and Macs ceased to exist, I would go back to Linux before Windows. But why don't I use Linux now? The reasons are simple. Like Windows, Linux requires constant upkeep. Unlike Windows, Linux requires far more manual maintenance. If there is a program I want to install and it requires certain libraries which I don't have installed, I have to go out and find them and install them before I can install the program I originally wanted to install. Again, I simply don't have time for that. Of course this manual maintenance is also one of Linux's key strengths. It is a ridiculously flexible operating system which can be customized for any use. I am not interesting in doing that as a web developer, however. Then there are drivers. A plethora of open source drivers for all sorts of hardware exist for Linux and you are very likely to find drivers for what you need. The problem is that a large number of them are buggy and not nearly as stable as proprietary drivers which come with other OSes. Linux is an amazing client for many devices such as servers (I use Debian) which do not have peripherals or whose hardware is not likely to change any time soon, but I just do not care for it on my own computer as it simply requires too much of my time to maintain.

So why, then, do I use a Mac? There are several reasons. Firstly, it has a native terminal because OS X is built on a Unix foundation. Secondly, it works with the hardware it comes with seamlessly which allows me to focus on my work and not on maintaining my computer so that I can work. This makes for a very stable environment which does not require much maintenance. Of course there are detriments to owning a Mac. One of the more obvious ones is that Apple likes to control everything. In reality, however, this doesn't bother me in the least. It doesn't hamper anything I wish to do on my computer and it can even be somewhat nice in that I don't have to worry thing I would have to on other platforms. One example would be buying an app from the Mac App Store. I don't have to worry about malware or problems; I can simply get an app that will do what I need without concern for my computer. As a web developer, my needs are relatively few and the Mac fulfills them better than any other platform I've tried.

Friday, February 24, 2012

Chrome 17 released

I know that this is old news by now, but I figure I will make a brief statement about it since it is relevant to this blog. Google released Chrome 17 just over two weeks ago which includes some very important fixes. Several security holes were patched and, most importantly for this blog, the YouTube bug was fixed which means my complaint earlier about Chrome not working with this blog is no longer valid.

You can find more information about the release on Google's Chrome Blog.

Monday, February 6, 2012

Problem with Chrome and YouTube

In a previous post, I ranted about why I dislike Google Chrome. One of the main reasons I gave was that it doesn't load this blog. Since I wrote that post, I think I have been able to determine what the problem is. In another post of mine I embedded a YouTube video and it seems that Chrome is having an issue loading some YouTube videos. Let's just hope Google is working on a fix for that because it seems pretty ironic that their browser wouldn't be able to handle videos from their own video service. I'm sure a fix is on the way though and I will be patient about it.

Sunday, February 5, 2012

Firefox Beta with New Developer Tools and Add-on Sync


Mozilla has announced several new features for the new Firefox Beta which will eventually become Firefox 11. The first and, in my opinion, the most interesting one is a new approach to make distinguishing elements on a webpage easier using a 3D rendering of the page. They call it 'Tilt'. It is based off of WebGL technology and renders the website in a three-dementional view with each element layered one on top of the other making it easy to determine parent and child elements in a page. An interesting approach to the traditional indentation which only allowed the developer to see the differences in the code rather than on the page itself. This is a preview of the feature:


A couple of other technical features are SPDY support as well as a new styles editor which allows developers to edit a page's CSS files with live updating then save the changes to disk. One of the features I personally am most excited about is a simple thing which is one of my favourite things about Chrome and which is lacking in all other browsers: add-on sync. Not only will we not be able to sync bookmarks and history with Mozilla's sync service, but now add-ons as well. I am very much looking forward to that feature as it will make managing multiple installations of Firefox across different computers much easier to handle.

See Mozilla's blog post for more details about some of the upcoming new features in Firefox 11.

Separating browsers: home and work

Recently I've been experimenting with a different workflow when it comes to dividing my private tasks and my work. To make myself more efficient, I've essentially adopted a multi-browser system. I've already alluded to this system in a previous post, but now I will fully explain it.

I work with a system where I divide my private tasks and my work tasks between two different browsers. The default browser on my Mac, Apple Safari, is what I use for my private tasks. I use Safari for private tasks because it is the fastest and most integrated browser available for Mac OS X. For spell-checking Safari uses the built-in system-wide spell-checker which means when I add an unknown word to the system dictionary, that change will be reflected when I type in Safari. It is also fully compatible with the Mac OS X Services menu which I use in combination with Automator in order to create system-wide scripts which automate certain repetitive tasks. One of the simple things which makes me happy with Safari is the "Add Image to iPhoto Library" option when you right-click on an image. I use that to download images quite frequently and, even though it may be a very simple thing, it saves me the step of having to download it elsewhere, then import it into iPhoto. Safari also feels as though it's by far the quickest browser available for the Mac which is very important when frequently browsing the internet like I do. Some people may argue that Chrome is also a very good, fast, and integrated browser for the Mac, but I would argue otherwise.

For my web development work, I use Mozilla Firefox. I use Firefox for a couple of reasons, but primarily for the available web development tools. With Firefox 10 Mozilla released its own, integrated web inspector which allows you to view the HTML and CSS of any given element within a page. Safari and Chrome both have had this feature built-in for quite some time, but the way in which Mozilla has implemented it makes it far more usable. Both Safari and Chrome (which use the same web development tools) open a panel at the bottom of the window whereas Firefox 10 uses the entire window. You can also just look at the CSS or just look at the HTML if you wish, thus saving screen real estate. Before Firefox 10 I used Firebug. Whilst similar to the web development tools in Safari and Chrome, it had a very key difference for me. When dynamically changing the properties of an element in the web inspector you have to push the return key when using Safari or Chrome before the change is reflected. With Firebug you can change the property and wait about a second and the change is reflected. That may seem trivial, but it saves a great deal of time if you do that as frequently as I do because then you don't have to reselect the element. Combined with other add-ons such as Web Developer, ColorZilla, Open with Photoshop, Selenium, and Awesome Screenshot, Firefox is a very powerful tool for web development.

What are your thoughts about it? Which browser(s) do you use and for what reasons?

Friday, February 3, 2012

Firefox 10 Mobile

I'm currently sitting in the waiting room at a train station waiting for my train to arrive. Whilst waiting I have been using the internet on my Android phone. My browser of choice for mobile browsing on Android is Firefox.

The reasons for this are pretty straight-forward. I enjoy using Firefox regardless of the platform mostly for ideological reasons. Mozilla is a non-profit organisation which supports many things I believe about the web such as openness and freedom online. I also appreciate what they are trying to accomplish with Firefox and am willing to give them my full support.

However, there are unfortunately a couple of things I somewhat dislike about Firefox for Android. It seems to be slower than the built-in browser (simply called 'Internet') and it hogs much more memory and CPU power. For a mobile phone, that is a problem. Other than that though, I find that it renders pages and performs remarkably accurately for being a mobile browser and would highly recommend anyone at least give it a go!

Thursday, February 2, 2012

Making DIVs behave like a table

A couple of days ago whilst working I was trying to figure out how to make a series of DIV tags work like a table. After doing a bit of research online, I stumbled upon the solution.

Essentially, you need three layers of DIV tags just as you would need at least three layers of TABLE/TR/TD tags. Each DIV tag represents the TABLE, TR, and TD tags, respectively. So, for example:

<div class="table">
    <div class="row">
        <div class="cell"></div>
        <div class="cell"></div>
        <div class="cell"></div>
    </div>
    <div class="row">
        <div class="cell"></div>
        <div class="cell"></div>
        <div class="cell"></div>
    </div>
</div>

plus the CSS classes:

.table {
    display: table;
}

.row {
    display: table-row;
}

.cell {
    display: table-cell;
}

would create the equivalent of:

<table>
    <tr>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td></td>
    </tr>
</table>

One thing to be aware of with this method, however, is that it is not compatible with older browsers which don't support CSS3. Internet Explorer 7 and 8 will, in that case, probably be the primary concern. Older versions of other browsers won't be as troublesome since users tend to update them more often.

You are probably asking why on earth you would do such a thing with DIVs rather than just use a normal table. The answer to that is mostly a matter of preference, but DIV tags do give you more flexibility when it comes to dynamic webpages. If you want to, for example, dynamically rearrange the page or swap items within the grid, DIVs offer more capability than the traditional table tags and you won't risk breaking everything since you can simply remove the class from the DIV via jQuery or JavaScript.

Why I dislike Google Chrome

I hear an awful lot about how much people love using Google's browser, Chrome. I have many friends and fellow web developers who swear by it, but honestly I can't understand why. Recently I gave it a fair shot. I downloaded it for my MacBook running Mac OS X Lion and used it as my primary browser for about two weeks. After that time I couldn't wait to go back to another browser.

Why is that? Well, there are a number of things I took issue with, but before I get into those, I will talk about my Chrome setup. I've talked with a few of my developer friends about some of the problems I've had and they've all told me I should reset Chrome's preferences and disable all of my extensions, then try again. That is usually sound advice except that I had a fresh copy of Chrome installed on my computer without any extensions and I hadn't changed any of the preferences at all.

Now to get into the problems I had. Firstly, Chrome refuses to load this blog. It simply refuses -- and that despite it being a blog hosted by Google! It just sits there and loads without end with the loading circle on the tab spinning around and around forever. Eventually the separate process created by Chrome for that particular tab starts eating CPU power until it reaches about 95%. Whilst Chrome does that, I can simply switch to Safari or Firefox on the same computer at the same time and the blog will load right up without a problem. I've had this issue with Chrome with a few other sites as well and there doesn't seem to be a sensible reason for it.

Secondly, the tab issue. I have to admit that I am appalled at Google's oversight with this issue. I am one of those people who, when they browse the internet, have many, many tabs open at once. I've been known to have up to 30 tabs open at one time. Chrome is not in any way prepared to handle that. The tabs get infinitely smaller until the favicons and the titles disappear and you can't distinguish between one or the other. Eventually, they reach a point where they won't get any smaller and they just run off the side of the window. How has Google managed to not have some way to handle excessive amounts of tabs?!?! This just seems like an absolutely unnecessary and lazy oversight!

Thirdly, it feels slower when rendering a page or executing complex JavaScript applications. Of course the numbers from the Benchmark tests would have you believe otherwise, but the main point here is that it feels slower. Firefox for Mac is not exactly known for its speed, but even it feels faster in this department. By far the best performer on the Mac though is Safari. Although Chrome uses the webkit rendering engine (the same Safari uses), Google has built its own JavaScript engine into Chrome called V8. It seems, however, that V8 is actually based off of an old version of Safari's JavaScript engine because websites that I visit frequently often behaved in Chrome like they did in older versions of Safari when it came to complex JavaScript functionality. Not only did it feel slower in Chrome, but some things just simply did not work at all! And this despite Google always touting its 'advanced' V8 JavaScript engine!

Finally, these technical reasons don't even take into consideration some of the other, more moral issues I have with the browser. Google Chrome is the only major browser which does not have a "Do Not Track Feature" and it seems as though Google is going to keep it this way since that would run counter to their business model of making revenue from advertising. Google will, by default, also log most of the what you type into Chrome's Omnibox (their moniker for their address bar) regardless of whether you are just searching or typing in URL. Given you can disable this in the preferences, but most users will not know to do this.

If you dislike Chrome so much, what do you use and why? Well, there really isn't a straight-forward answer to that. As most web developers do, I use a combination of browsers. For my primary browsing, I use Apple's Safari which is best integrated into Mac OS X. It feels like it's by far the snappiest browser on the Mac and it also uses a lot of the built-in features of OS X such as the system-wide spellchecker, the Services menu, and built-in dictionary to define words when you right-click on them. For development purposes, I primarily use Firefox. That is because it is a cross-platform browser that is widely used and I can account for quirks that may arise in it. The developer tools are also far superior to Safari's (Chrome's are exactly the same as Safari's). Until now I've always used several extensions for Firefox such as Firebug, Web Developer, Selenium, ColorZilla, Awesome screenshot, User Agent Switcher, etc. With version 10, Mozilla released their own built-in developer tools which I am in the process of testing out, but should those prove to be inferior to Firebug, I will simply go back to using Firebug instead.

Now that I've carried on about how much I dislike Chrome, I do have to admit that there are a couple of things I really do like about it. Google did a really great job designing the interface (other than the tab problem) so that it looks nice, clean, and easy to use. I like the ability to sync through my Google account. Firefox and Safari both have the ability to sync as well, but they only sync bookmarks, whereas Chrome will sync bookmarks, extensions, preferences, etc. That I find very nice. The last thing I found so great about it was how easy it was to uninstall. After all of the headaches it caused, I couldn't wait to uninstall it and remove it from my computer entirely. Not a very good impression I have to admit.

I've discussed some of these issues with my friends -- both web developers and non-technical people -- and I am not alone in dealing with some of these issues. The non-technical people seem to have no idea and be perfectly happy with it (like most who are happy with Internet Explorer, but we won't get into that), but most web developers I know also have their issues with Chrome that make it almost unusable. What have your experiences been? Have you had any problems with it?