New Font by Adobe: Source Code Pro

27. September, 2012

Some of us know that software not only has to work, it also should be beautiful.

One important aspect here is the font. How does this look:

1Il|iO0oB8

If you can’t tell for sure which character is which, you probably don’t use a good font.

Paul D. Hunt, a font designer working for Adobe, finally spent some time to make life for his fellow developer easier:

As a font developer, I spend a good chunk of each day coding in a text editor and reading output messages from a terminal window, so I can appreciate the importance of a good monospaced font. (source)

If you’re interested in font design, his blog post contains some of the ideas and decisions he made when designing the font. Btw, the text above looks like this in Source Code Pro:

Some potentially confusable characters

You can download the font on Sourceforge or look at the source at GitHub.


Jazoon 2010 Day 1

2. June, 2010

So, this is the great wrap-up of Jazoon 2010, day 1. What did I have?

The keynote by Danny Coward

Java SE and JavaFX: The Road Ahead. After the acquisition by Oracle, everyone was curious as to what happens to Java. Unfortunately, the slides aren’t online, yet but from my faint memory, we might get closures after all and with a sane syntax, too. Plus all the stuff mentioned on Sun’s JDK 7 page. ATM, this stuff is a bit fluent and it’s hard to get a definitive list but something is moving at least.

From my point of view, closures and all the other language features are too late for the Java language (important companies won’t upgrade to Java 7 and time soon, some of them even cling to 1.4!) but the implementation in the main language of the Java VM will allow to build better and faster non-Java languages on top of the VM. Now if the VM would include a compiler API to build JNI code for native libraries on the fly, we would have a worthy challenger for .NET. Yeah … I know. A man can have dreams, okay?

And there was some talk about JavaFX. It seems that the technology is starting to reach its beta-phase, soon (see my notes for the second day). He showed one demo: Geo View of Vancouver 2010. It’s a world map with which country won how many medals and when you open one of the blobs, you get the names of the athletes in a fan-out widget. You can click on the name to get more information (like the photo) or you can compare the results against countries with the same number of athletes or population or closest GDP or just closest geographically. It gives a nice example how to visualize a lot of data and wade through them intuitively.

Client / Server 2.0 with Java and Flex by James Ward

James showed how you can use Flash and a Java server to build really nice web apps. He showed several examples: A few lines of code to build a UI which runs on an Android mobile phone, in the web browser and on the desktop. All with really nice performance. One was the insurance company demo. Just enter some arbitrary data until you come to the damage details and incident report. They show new ways to enter information which make the tool usable to anyone who can recognize a car and a top-view of a street.

If you like what you see, you should probably take the Tour de Flex. It shows off a whole lot of stuff. Also try the Tour de Flex Dashboard. It shows you in real time who looks at what part of the TdF right now.

Blueprint – Modern Dependency Injection for OSGi by Costin Leau

Another DI system, this time tied to OSGi. Nothing really exciting here. The talk was okay but the speaker soon lost my interest.

One thing to note: Eclipse 4 comes with a different DI system. I wonder if they will drop that in favor of the new OSGi standard in 4.1.

Patterns and Best Practices for building large GWT applications by Heiko Braun

I went to see this but quickly realized that I’ve heard the talk before at the JUGS. Here is the link to the slides. As a result of his experience he started project errai which collects best practices to build large GWT applications.

Objects of Value by Kevlin Henney

One of the main weak points on software development is that we don’t know what we’re talking about. When my project manager comes to me and asks “When are you done?” my answer is “Soon” … Right 😉 Or think about strings. Everyone else on the planet calls it “text”.

Obviously, Kevlin had a lot of fun on stage and so had we. In essence, “Objects of Value” or “Value Objects” are even more simple than POJOs (think Integer class). The main reason to use them is to make your code more expressive and readable. Instead of

public User (String name, String firstName, int age, String zipCode, String city)

you (can) create a couple of value objects:

public User (Name name, FirstName firstName, Age age, ZipCode zipCode, City city)

This may sound ridiculous (and it is in this example) but in a lot of places, using String is just a form of bad laziness (the kind of laziness which leads to maintenance problems later). One of the advantages of the approach above is that you notice when you mix last and first name because the compiler will tell you. The major disadvantage is that it leads to a class explosion. Not to an instance explosion since we just replace a String value object with something that tells us what we have, though.

In addition to that, Java isn’t really meant for these kinds of objects. There is a lot of boiler plate code to define value objects and to use them. But if you have a system that is sufficiently complex and you use a value with a unit in many places (think of a currency value), you should really consider to replace the String+BigDecimal combination with a value object.

Many important points of his talk can be found in the paper Objects of Value on his homepage.

This concludes the first part of my Jazoon 2010 report. Go on with part 2.


Adobe Flash 10 Just Sent me Through the Roof [Update]

17. September, 2009

I just got the latest security fixes for Firefox 3.5.3. Finally, the browser warns me about outdated and insecure plugins. I like it!

Top of the list? Adobe flash player. Hm. The page needs JavaScript. Guys, other people managed to build click buttons with an image without JavaScript. *sigh* “Temporarily Allow adobe.com”. Huh? What’s that? “Free McAffee security scan (optional)”? Optional my a**! Die, die, die!

So I click the link. “get.adobe.com tries to install software on your computer. Enable?” Sure.

WTF? What the hell is “getplusplus”? And what’s it doing on my computer? *lot’s of swearing and cursing that you don’t want to hear* I hate it when someone smuggles unwanted software on my computer. Adobe, if you’re listening: THIS IS MY F***** COMPUTER! SO HANDS OFF!!!

After a restart, I can finally download … ah, crap, again this stupid McAffee! *ARGH*

Ok, it’s downloading. *grmbl* … installing. Hm. Well? Now, what? Anything happening anymore? Let’s check … nope, FF is still unhappy and about:plugins says 9.x.

Again. “Installer was already downloaded”. Really? So why isn’t it installed? Has Adobe finally managed to write software that can lie? Great. That’s what I really needed first thing in the morning.

Okay, np_gp.dll obviously isn’t worth the disk space it occupies. But since Adobe managed to infest most web pages on the Internet with their flash crap, a solution is necessary. Here goes:

The download shit from Adobe puts the files into %ALLUSERSPROFILE%\*\NOS\Adobe_Downloads\. Replace “*” with “Application Data” or “Anwendungsdaten” or your local name for that folder. In that folder, you should find a file “install_flash_player.exe”. Save that somewhere.

Open the addons and delete “getplusplus”. Exit Firefox. Now delete “np_gp.dll” in the plugins folder of Firefox. That should get you rid of that unwanted crap.

Before starting Firefox, run the installer manually. Check the details. Make sure that the installer installed the plugin in the Firefox directory instead of somewhere else. On my computer, it ended up in Opera’s plugins directory. If that’s the case with you, too, then copy the files “NPSWF32.dll”, “NPSWF32_FlashUtil.exe” and “flashplayer.xpt” manually.

Start Firefox and open about:plugins again. Search for “flash” and make sure that the version is 10.x. To make 100% sure, visit http://en.www.mozilla.com/en/firefox/3.5.3/whatsnew/. The security warning should now have gone away.

[Update] Apparently, the download manager is a security risk. So remove it ASAP.