iPhoto order language is wrong

iPhoto logoFor a very long time I was annoyed that the iPhoto order language is wrong for me each and every time I order print products from Apple. I live in Switzerland, speak mainly German and English, on my Mac I use English as the system language yet the iPhoto order language is always French (which I’m no longer fluent in) instead of German. Continue reading →

This movie requires QuickTime, which is not supported by this version of iTunes

If you found here looking for how to fix “This movie requires QuickTime, which is not supported by this version of iTunes.”, good it’s here:

  • run iTunes in 32bit mode
  • and/or update Flip4Mac to 3.x if you’re still on 2.x

Continue reading →

Techniques how to use ellipsis in table columns

The CSS3 text-oveflow property allows to have content not exceed a certain limit. Browsers can be asked to place ellipsis, the … “character”, after the last visible character rather than just cutting content off. It’s a nice visual indication for readers that there’s actually more content than what is shown. Later you’ll learn techniques how to use ellipsis in fixed-width or max-width table columns using HTML and CSS. Continue reading →

How to be successful on Stack Overflow

Stack Overflow logo

In December last year (2012) an inner voice told me to be more active on Stack Overflow. More active? Ok, active at all. Up to then I had almost exclusively asked questions rather than answered other people’s questions.

I quickly got the hang of it and challenged myself every day to do more. Until I got tired of it. Here’s what I learned in the process. Continue reading →

First steps with IntelliJ IDEA

On December 20th, 2012 I bought an IntelliJ IDEA license from JetBrains at 75%. I have been developing with Eclipse for ages but that offer was just too good to resist. It isn’t the first time I go through “First steps with IntelliJ IDEA”. A few years ago when I was working with a couple of friends on spontacts.com I was forced to use IntelliJ IDEA from time to time because they all used it. It wasn’t an entirely pleasant experience for me. It wasn’t that I had a hard time finding the right keyboard short cuts. With every new application that’s usually something that takes some time getting used to. It was because their shortcuts are so darn ilogical! I’d be surprised if you didn’t agree with me but let’s see…

first steps with IntelliJ IDEA

First steps with IntelliJ IDEA

Keyboard shortcuts

With every application that allows you to create something new (image, text, spread sheat, you name it) you’d expect to use some kind of command/control key plus ‘n’ to do so, right? That seems to be something of an unspoken rule across the western world. Just as ctrl+s for save or ctrl+p for print. For Macs you substitute ctrl with ⌘. In IntelliJ IDEA this logic of common sense is absent. A few examples I ran across in the first five minutes:

operation OS X Win note
new file ctrl + N alt + ins real “new” (⌘+N/ctrl+N) reserved for ‘navigate’
format code ⌘ + L alt + ctrl + L L refers to what exactly?, ‘format’ expected to be F
rename shift + F6 shift + F6 rename’ expected to be F2 or command + R
delete line ⌘ + Y ctrl + Y command + D is reserved for ‘duplicate line’ (ok, accepted)


How sick is that?
Oh, and command + P doesn’t print anything – it’s undefined.

Read the JetBrains forums and you’ll find numerous frustrated users (e.g. http://devnet.jetbrains.com/thread/436062). Worse, the shortcuts are broken for non US keyboard layouts as this long-standing issue proves: http://youtrack.jetbrains.com/issue/IDEA-63779.

Users go even further and publish their own shortcuts reference because IntelliJ IDEA behaves even differently than what is documented. Example: http://victorvolle.wordpress.com/2012/05/16/intellij-german-keyboard-shortcuts-reference/

Formatting

The first thing I changed in terms of formatting was to switch from 4 spaces to 2 for indentation: “Formatter -> JavaScript/Java”. Then it bothered my that the editor offered something they call “virtual space”. That means you can place the cursor beyond the actual EOL or EOF, very irritating for me. To turn this off you do “Preferences -> Editor: allow placement of caret after end of line (virtual space)”.

At Netscape, getting it right was not an option…

…which is why there is no longer Netscape – Douglas Crockford

Douglas Crockford talking about shallow vs. deep scanning in JavaScript’s for in statement in JavaScript: The Good Parts, 18m 03s.

How to learn JavaScript

(One of) My New Year’s resolution for 2013 is: learn JavaScript properly.  The question is how to learn JavaScript properly.

Why is ‘properly’ emphasized? I read and wrote my first lines of JavaScript back in 1998. So, I’ve been using it on and off for 14 years- and it always felt bad. All those years I felt kind of ashamed that I never learned it properly. I somehow suspected that the code I wrote wasn’t really good although it did what it was supposed to do. Then I watched JavaScript: The Good Parts on YouTube. It was eye-opening in three ways. First, Douglas Crockford of then-Yahoo!-now-PayPal discusses why so many people are in the same situation like I never learning the language properly. Then it confirmed my suspicion that I new barely anything about JavaScript. And lastly, Crockford awoke my interest by admitting there are bad parts in JavaScript but at the same time showing all the good parts some of which I didn’t get. But…

How to learn JavaScript

I’ve been writing software for a living since 2000 (based on a “BS in software engineering”-foundation). Hence, I’m experienced and familiar with computer science. A JavaScript book that starts with Adam & Eve won’t do it, though. On the other hand for the various “Advanced JavaScript”-style books my JavaScript know-how wasn’t good enough. Also, attending a JavaScript course didn’t feel right to me considering my background. So, I set out to a self-study endeavor – with the help of Douglas Crockford’s material.

The books

There will be a dedicated post about Crockford’s book “JavaScript: The Good Parts” later. All I want to say here is: go get it! It’s an easy read in a way that it’s nicely written but it takes time to really comprehend the material presented. Reading it chapter by chapter and experimenting with the code samples was tremendously rewarding.

At the same time I also bought “JavaScript Patterns” by Stoyan Stefanov. Didn’t start reading it though.

Cover of Douglas Crockford, JavaScript: The Good Parts

 

The videos

Starting in 2010 and through 2011, Douglas Crockford delivered his acclaimed series of lectures on the history of JavaScript, its features, and its use. They contain some talk about about the new ECMAScript5 and a nice computer science history lesson, leading up to the invention of JavaScript. I highly recommend these videos – they’re very informative and entertaining. Aaaand the production quality is much higher that the previous three series listed below.

  1. Crockford on JavaScript – Volume 1: The Early Years
  2. Crockford on JavaScript – Chapter 2: And Then There Was JavaScript
  3. Crockford on JavaScript – Act III: Function the Ultimate
  4. Crockford on JavaScript – Episode IV: The Metamorphosis of Ajax
  5. Crockford on JavaScript – Part 5: The End of All Things
  6. Crockford on JavaScript – Scene 6: Loopage
  7. Crockford on JavaScript – Level 7: ECMAScript 5: The New Parts
  8. Crockford on JavaScript – Section 8: Programming Style & Your Brain

Below are some older videos from a 2007 trilogy which are just as informative but in lower quality. Needless to say that you’ll see a lot of the same material in both series.

  1. Douglas Crockford: The JavaScript Programming Language
  2. Douglas Crockford: An Inconvenient API – The Theory of the DOM
  3. Douglas Crockford: Advanced JavaScript

There are variations of the most of the above videos available on YouTube. Crockford is a frequent speaker at conferences and gave the same or similar talks.

Spring proxy self-invocation

Is it Spring proxy self-invocation or Spring proxy inter-object calls – or something completely different? I don’t know but I hope it makes sense to you anyway.

Several options for Spring proxy self-invocation

https://jira.springsource.org/browse/SPR-8450 and http://stackoverflow.com/questions/5152686/self-injection-with-spring show several options for self-invocation. For details follow the two links. Here’s just the hints:

  • Option a: have the ApplicationContext auto-wired into your bean, then rather than using ‘this’ get the bean from the app context
  • Option b: have the proxied bean injected into itself using @Resource(name=”yourbean”)
  • Option c: use AspectJ

IntelliJ IDEA, WebStorm et. al. for (almost) free

Today, and only today we’re told, JetBrains offers a 75% discount on their products such as IntelliJ IDEA. Hurry…but wait, be patient. Apparently their web shop is overrun be eager developers who want to buy their own Christmas present. In fact you may not be able to order at all.

I’ve tried for hours until I finally got through. In the meantime I got this nice screen:

Everybody ordering IntelliJ IDEA?

JetBrains showing error message that they're overloaded when trying to buy IntelliJ IDEA

AngularJS – build modern single-page web apps

AngularJS logoAngularJS @Devoxx 2012

I attended the AngularJS workshop @Devoxx – a blast. AngularJS has really opened my eyes as for how to build modern web apps. I think I became angularized in an instant. Then I went home and to told our CTO and a few colleagues at work. A few days ago we started building our first Angular app for customers. No, not because of my intervention…the team had already been thinking about using Angular. What I’m really excited about is that for once I’m not the only one who is looking forward to introducing something new. A pity I’m not part of the team that uses Angular.

Btw, you can watch the AngularJS talk (not the workshop) at Parleys if you have an account. If not you’ll find lots of AngularJS videos on YouTube.

Backed by Google

I like the fact that Angular is backed by Google. You may or may not like Google but having Angular backed by a strong web-centric company like Google gives me confidence that it won’t just go away because the originators decide to abandon it. This is essential for corporate adoption.

Fantastic documentation

The Angular website is super clean and allows for a quick but gentle introduction to Angular. The documentation and the tutorial are hard to beat. I warmly suggest you go through the tutorial the next time you have some spare time. No, wait. make some spare time to teach yourself Angular!

Spread the word

If you’re interested to learn what others do with Angular check out the apps over here: builtwith.angularjs.org. What my colleagues are building is ultimately going to be public but we’ll have to wait and see if our customer will approve talking publicly about the fact that his app is built with Angular.