Harald Ringvold

My own site. Beacuse I can.

IE Sucks and the Doctype Importance

Internet Explorer suck. I have yet a new reason. Well, new for me. I did not know that IE would fail so incredebly.

So here is the scenario. I have created a very simple and small site for a customer that relies heavily on Twitter Bootstrap. It looked good in Chrome and the others as you would expect. I use Arch Linux so testing a site in IE is something I need to make an effort to get done so I had not done that yet. I was no surprised when I got a mail for the customer saying the site did not look good in IE. I actually expected it (then agian I didn’t since I thought Bootstrap would take care of most of it and as it turns out it actually did). And the customer has right. It looked awful! And then it hit me that I had forgot the html5-shiv that makes html5 elments be rendered by IE.

But after adding this is actually look worse! That made no sense at all! I searched and googled but found no good explenation for this. I checked the Bootstrap web page and it worked like a charm in IE8, even without the shiv. After some head scratching and some minutes as a living question mark I started to suspect that this might be a rendering problem. The CSS did not work properly. I can not quite remember how I got to think about it but I checked the docype and then I saw the problem. The bang (!) was missing in the tag!

Like so:

wrong version
<doctype html>

Correct version:

correct version
<!doctype html>

I knew what was right but some how ignored it. The reason it took so long time to notice it is that all the other browsers rendered it correct event if this little, but very important detail was wrong. IE on the other hand failed miserably. This browser still amazes after so many years of common knowledge of its incompetence.

Well, now you know this little bit of technological fact about browsers and doctypes. And if you already knew you now know that I know. Ain’t that neat? ;)

Capybara Fail

I can not figure out why capybara can not find the elements. I know they are there. I have checked in the browser and tried by id and name instead of label. It still does not find the elements. Anyone had similar problems with capybar?


  1) AddUser creates a new user
     Failure/Error: fill_in "Name", :with => "Harald Ringvold"
       cannot fill in, no text field, text area or password field with id, name, or label 'Name' found
     # (eval):2:in `fill_in'
     # ./spec/requests/add_users_spec.rb:7:in `block (2 levels) in <top (required)>'

  2) EditUser edit user
     Failure/Error: fill_in "Name", :with => "Harald Ringvold"
       cannot fill in, no text field, text area or password field with id, name, or label 'Name' found
     # (eval):2:in `fill_in'
     # ./spec/requests/edit_user_spec.rb:10:in `block (2 levels) in <top (required)>'

Ubuntu 11.10 Is Not All Bad

After using Arch Linux for some time now and Pinguy for a short peroid and then switshing between them the last months I have now been using Ubuntu 11.10 for some weeks and I’m actually very happy with it. I’m satisfied with how unity now work with some exceptions and I’m getting used to the whole Mac-ish panel and window buttons on the left side thing. What annoys me is how incredebly slow the search window thingy is after startup. You have to wait for serveral minutes to be able to start a program. This is not good enough. I have installed Kupfer but I’m out of ctrl/shift/super+space shortcuts. Aslo the dock on the left side is too slow in reponding. I guess it acts that way to not pop open every time you accidentally get the mouse in on the left edge of the screen. It is a nice thought but it does not work for me so I complement by using Docky

The one thing I really miss from Arch is the AUR. Not the compiling stuff of it but having one place where user can submit and install packages from. It is tiresome to install PPAs for every little program that is not in Ubuntus repos. (Side note; why o’ why is not Netbeans in the Ubuntu repos?) This have made me wonder why someone haven’t created something like AUR for Ubuntu. If there’s nothing like this for Ubuntu I’ll try to make it. This must be something that other Ubuntu users also want. A bit more convenience.

Testing Octopress

I recently found a interesting pice of blog tech called Octopress that I’m trying out here. It is based on Jekyll, a “blog aware static site generator”, which basicly mean that it generates a bunch of files at that is displayed as a blog (Jekyll is used by the github documentation . Flat files is neat for performans. Wordpress is no doubt the best blog software out there but this is so much geekier that I could not pass out trying it. I’m not much of a blogger but I love geeky stuff. Maybe it motivates me to blog some more. You can actually run your blogg in Github or Heroku! I’m going for deploying to my own server using rsync and see how that works out.

Making your own theme initially looks a bit tricky but I might just have to look a bit deeper into it. I’m planning on making my own theme but for now I’ll stick to the pre shipped one, which frankly is pretty nice.

Sorry Excuse of a Blogger == Me

This is a sad excuse of a blog. It’s so sad that I might just cry even if that will break my strong image as a hard, tough man…

Really! It is THAT sad! But what can you do if you just are not cut out to blog? If your mouth does not constantly suffer from diarrhea and the need to say something about everything and anything?

I have my moments though. Sometimes I really have to get my opinion on something out and I write what feels like two pages worth of stuff I feel like everyone should, no, MUST read. But sadly my span of attention to one thing is very short. At least when it comes to writing stuff for the blog. After awhile it is just not that interesting. And it might have something to do with at one point the stress of making time for writing a post and making it good enough to publish overweights the need to express my self.

Isn’t that just too sad to even feel sorry for? I almost think so. Almost. Please feel sorry for me! PLEASE!?

OK, so I will try to not flip out completely, but I can’t promise any thing. One interesting thing to note is that I almost have more drafts than published post. This is obviously the effect of the conditions explained above. I will try to finish them. Some of them may be kind of out dated because of me changing my opinion on the matter. It is little depressing to having written a complete or half way post with an opinion I no longer share with myself. Geesh, that IS depressing. At least it shows that I am open minded to change and not just stuck with my opinion. I hope.

So now I think I am almost done whining about my lack of blogging skills. Some of you might suggest that I just close down the blog. That might just be the best idea, but I am stubborn. I feel as the ├╝ber geek I am, that hosts several other blogs for people I need to have one myself.

One thing I have been thinking about for a long time is to make a page that just shows some info or my activities on teh internetz and then link to the blog form there. Maby like Ari or like what I made the first year the university. Which has actually when I got the idea. Ok, I might just have stolen the idea form Chris Spooner :P. Though he is no longer using it.

Sooo..I think that’s it for now. Until next time, Have a good life! ;)

Thesis/WordPress (#thesiswp)

So I have some thoughts after reading up on the Thesis/WordPress situation and watching the debate between Chris and Matt. If you need to catch up I found this summary quite good mainly because of the debate video is found there.

What’s up?

So the problem is that Chris Pearson creator of the premium WordPress theme Thesis and Matt Mullenweg, founder/creator of WordPress disagrees about if the themes and plugins for WordPress also needs to be GPL licensed. And theny are lot alone many developers follows this debate and have their roots for the different sides. It all basically boils down to different interpretations of the GPL license (in regards to if a theme needs to inherit the GPL license) and as I understand there is not a certain definition of this yet. For now there is just the opinion of each individual or organisation. And this is why this is so interesting. The outcome of this situation could have a big consequence for CMS that uses GPL license or the theme creators. I say could because it may not be this situation that triggers the final legal definition.

Comments on the debate

I understand both Chirs and Matts side of the situation. Chis is defending his work and livelihood, being completely convinced that he can have his own license on Thesis. And Matt on the other side can not let what he believes is a violation of the license just pass by for other to follow. These sides are not crazy. They are reasonable if you look at their respective views. The one thing I don’t understand is how reluctant Chris is to use GPL even if it would not compromise his work and income. Matt points to that almost all other themes is using GPL and pointing to examples that uses and actually change to GPL and doing very well. Matt even said he would point people to Chris and Thesis if it was changed to GPL. He still would not consider it. Only if he by himself found out that GPL could be used, would he would change. I just didn’t get the extreme reluctance. But I understand that he wants to fight for his opinion and not give in. If that is the best thing I can not say. Maybe in the end he should have or maybe he will go out with his flag up high. We will have to see how it ends.

What to think?

I am not sure what to think about this situation. For now it is just one opinion against the other, backed up by different lawyer or organisations. That being said I find these articles interesting:

http://perpetualbeta.com/release/2009/11/why-the-gpl-does-not-apply-to- premium-wordpress-themes/ http://perpetualbeta.com/release/2009/12/why- the-gplderivative-work-debate-doesnt-matter-for-wordpress-themes/

http://apeatling.wordpress.com/2010/07/14/thesis-and-the-gpl/ http://jane.wordpress.com/2010/07/15/thesiswp/

What do you think? Don’t be shy, feel free to express it in the comments.

So now what?

I could only guess what would happen next and I do not what to speculate too much about it. It could go to curt and be settled there. The outcome will in that case certainly be interesting. Until then we can not much more than speculate, make summaries and express our opinion on twitter and blogs;)

Google vs. Apple

OK, I’ll say it straight away, I love Google! Not as I love my fantastic girlfriend Tonje, but as you would love your car or iPhone (if you’re into that:P). The following is me venting my thoughts on Google, Apple and what I like and dislike about them. Hopefully you will understand why I like Google.:)

Google and Apple are two quite different companies in different markets. Obviously Android and iPhone is competitors, and more may come, but for now they have mostly different markets. Google does developer tools and web services (main target/market: developers, corporate and consumers) and Apple does hi-end, exclusive consumer products (main target/market: consumers).


I generalized Google’s and Apple’s target groups, but I understand that that it’s not necessarily the reality. Google is moving over in the consumer market with Android and soon Google TV. The interesting this is to see how they do it and what their attitude is like. In most all aspects of Google (if not all?) they are like “we made this, and are excited to see what you guys can do with it” and really wants user input on what the products is like and how to improve it. They give you a choice, they are open, they listen to user/developers, they empower users and developers.


Apple on the other side I feel is more like “we made this product. its awesome. love it!” and then they hype it and present it in a way that make people think it is it super awesome and that Apple invented everything that is good in the world. Yes, I’m a little negative towards Apple. Don’t get me wrong, they have some great products, but they completely brainwash people to think that they are perfect and God of technology. People will swallow everything they throw at them. Heck, it’s a hell of a good marketing strategy which obviously works very well, but I don’t like it! ;p

So why care?

You could give a big /CARE and, well, just don’t give a crap. :p But I think most people do care about these things. How much may vary but I most do. Do you? I do for the same reasons I use Linux. One of them is principal. Others is that I like to have freedom to choose and not having one man telling me what to think and like. My last tweet encapsulates the essence of how I perceive these two companies (at this moment at least).

Don’t get me wrong, I don’t hate Apple. I just don’t love and buy everything they say or do (or sell). I’m actually going to buy a MacBook soon. Yeah, the irony. I know. :P

You may not feel this way at all. What do you think about it? Feel free to express yourself in the comments. :)

ZendX_JQuery Problems, Be No More!

So I have tried to get ZendX_JQuery working the last hour or so (could be more) and it just wouldn’t work.

I googled all over the place. Read blogs, wikis, the Zend Referance guide, stackoverflow questions and forums. They all say to do the same thing: Put this in your layout: $this->jQuery();

and this:

$view = new Zend_View(); $view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper'); $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer(); $viewRenderer->setView($view); Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);

in the bootstrap.php.

The problem is that it work on the views where I use jQuery, but on the others I get a long error message. Here, share the pain with me:

“Fatal error: Uncaught exception ‘Zend_Loader_PluginLoader_Exception’ with message ‘Plugin by name ‘JQuery’ was not found in the registry; used paths: Zend_View_Helper: Zend/View/Helper/:./views/helpers/’ in /opt/lampp/htdocs/mjfregistration/library/Zend/Loader/PluginLoader.php:412 Stack trace: #0 /opt/lampp/htdocs/mjfregistration/library/Zend/View/Abstract.php(1170): Zend_Loader_PluginLoader->load(‘JQuery’) #1 /opt/lampp/htdocs/mjfregistration/library/Zend/View/Abstract.php(610): Zend_View_Abstract->getPlugin(‘helper’, ‘jQuery’) #2 /opt/lampp/htdocs/mjfregistration/library/Zend/View/Abstract.php(336): Zend_View_Abstract->getHelper(‘jQuery’) #3 [internal function]: Zend_View_Abstract->_call(‘jQuery’, Array) #4 /opt/lampp/htdocs/mjfregistration/application/layouts/scripts/layout.phtml(8): Zend_View->jQuery() #5 /opt/lampp/htdocs/mjfregistration/library/Zend/View.php(108): include(‘/opt/lampp/htdo…’) #6 /opt/lampp/htdocs/mjfregistration/library/Zend/View/Abstract.php(880): Zend_View->run(‘/opt/lampp/htdo…’) #7 /opt/l in /opt/lampp/htdocs/mjfregistration/library/Zend/Loader/PluginLoader.php on line 412”

So finally I find this video and in it the code that actually works :D

$this->bootstrap("layout"); $layout = $this->getResource("layout"); $view = $layout->getView(); ZendX_JQuery::enableView($view);

I’m not sure why the thing that every other tutorial and blog says to do didn’t work, but this did, so at this point I’m happy:D

Looooaaaad Times

For now I wil be using this basic theme until I find something else. The blog was very slow and I could not find out what caused it. I actually messed up my server trying to fix it. Thank god for AMIs! It turns out that the problem is the plugins and theme so now I use this basic theme and just the necessary plugins. Twitter tools was the one that most clearly made the site slow. It could just be because I use suPHP but I never had any speed problems when I hosted on domeneshop.no, which also runs suPHP.

EDIT: Edited the theme a little and removed some stuff. Now the theme is a little faster and usable.

EDIT2: And then a beautiful word popped into my head. Cache. So installed some cache plugins. I also disabled Twitter tools again . It very clearly slows the page down.

Compositing With Metacity

Update: There seems to be a problem with fullscreen video rendering with compositing enabled in metacity. Until I find a fix I’ll just have to stop using it.

I have allways thought that people needed to write down what they had done to fix things was a little wierd. Why couldn’t they just remember it? But after other starting to use Arch Linux and asking me how I did different things and fixes I realize that I should have made some memos for later use (now). I probably going to start posting these kinds of post more regularly, at least whenever do some fixes thats forth remembering, but lets get back to the original intent of the post.

Gnome Do

window manager” [with1]:http://ringvold.nu/wordpress/wp- content/uploads/2010/04/gnomedonouveau.png content/uploads/2010/04/gnomedocool.png [with3]:http://ringvold.nu/wordpress /wp-content/uploads/2010/04/gnomedodock.png content/uploads/2010/04/gnomedonotcool.png

So why would I need compositing at all? Well, the whole thing is mostly base upon the fact that I use gnome Do a lot and with compositing it could look cooler and do a some cooler stuff like transparency and docking, basically cool stuff. This is gnome do without compositing [and this][with1] is gnome do [with compositing][with3]. Compositing will also make it possible to have some shadows, transparency and other eye-candy stuff. I had thought about using compiz but I have a nice setup with metacity and compiz uses a lot of resources on stuff I don’t need, plus some things I need to fix to get to work, which I don’t bother.

So I did some research and found that it was indeed possible to do compositing in metacity. To make a potentially long post a little shorter I found a program that manages compositing for metacity. It is called xcompmgr and is a commandline program, there is a graphical front- end (gcompmgr) but I could not get it to work. the command xcompmgr -cCfF -t-5 -l-5 -r4.2 -o.55 -D6 & enables the compositing and configures the shadows nicely. The command is found on the previously linked wiki page for xcompmgr. Xcompmgr is found in AUR on Arch Linux.

So now I got compositing without having to use compiz. If you like the whole wobbling windows, animations and rotating desktop, compiz is what you need. But if you are looking compositing for a spesific thing (like gnome do) of just what to have a little sleeker desktop without having to use compiz, xcompmgr is the way to go. It supposedly works for other windows managers as well, not only metacity.

Resources: Enable Metacity Compositing in GNOME 2.22 Gcompmgr: Graphical front end for Xcompmgr Composite Window Manager Xcompmgr on Arch Wiki