amazing development » Work http://amazing-development.com ruby, java and the rest Fri, 29 Nov 2013 18:57:08 +0000 en-US hourly 1 http://wordpress.org/?v=3.4.2 How to set up your own dyndns server (simple!) http://amazing-development.com/archives/2012/02/13/how-to-set-up-your-own-dyndns-server-simple/ http://amazing-development.com/archives/2012/02/13/how-to-set-up-your-own-dyndns-server-simple/#comments Mon, 13 Feb 2012 21:03:25 +0000 schlumpf http://amazing-development.com/?p=524 This post has moved to http://ujap.de/index.php/view/DyndnsServer.

Please update your bookmarks.

]]>
http://amazing-development.com/archives/2012/02/13/how-to-set-up-your-own-dyndns-server-simple/feed/ 2
New project at Google. http://amazing-development.com/archives/2011/04/13/new-project-at-google/ http://amazing-development.com/archives/2011/04/13/new-project-at-google/#comments Wed, 13 Apr 2011 18:04:40 +0000 Frank Spychalski http://amazing-development.com/?p=495 For the last 3 years I was working in an area called Engineering Productivity at Google. This group builds internal tools for other engineers but sadly there is very little I can talk about, except for the obvious facts: it’s challenging, fun and at a scale I hadn’t seen before.

Well, a few weeks ago I switched projects and focus areas. Now for the first time in my career[1] at Google I work on a customer facing product: the Google Privacy dashboard. Obviously I can’t write about upcoming launches, but I can assure you that there are many cool new features in the making.

[1] This is not 100% true. A little over two years ago I did some 20% work on the dashboard, so there is already a tiny little bit of code online that yours truly wrote. In case you are curious, it’s the logic that makes sure you get to see the privacy statement for your country, e.g. http://www.google.com/chrome/intl/en/privacy.html or http://www.blogger.com/privacy?hl=en.

]]>
http://amazing-development.com/archives/2011/04/13/new-project-at-google/feed/ 0
Customize Chrome Omnibar http://amazing-development.com/archives/2010/05/20/customize-chrome-omnibar/ http://amazing-development.com/archives/2010/05/20/customize-chrome-omnibar/#comments Thu, 20 May 2010 06:31:13 +0000 Frank Spychalski http://amazing-development.com/?p=453 I love Chrome! But one thing drove me crazy: we have numerous internal web-apps running on different hosts. From Firefox was easy to get to these tools by just typing the toolname (not the FQDN) in the url bar. Chrome knows it better and assumes that I want to search for toolname. A moment later it asked me if I meant toolname/ and remebers this choice (at least it annoys me only once per tool).

Yesterday I I got an idea and tryed a snippet of javascript as a search engine and was happy to see that it worked as intended. A few minutes of javascript hacking later the omnibar behaved the way I like it:

  • multiple words are a search query
  • single words are URLs, even without the trailing slash, always!
  • fix broken http at the start of an URL (happens to me sometimes when I cut’n'paste)

This is the current version of my default search engine, feel free to criticize, I’m a JS noob:
javascript:query="%s"; if (query.search(/\\s/) != -1) { window.location="http://www.google.com/search?q=" + query; } else { query = query.replace(/^h?t?t?p?:\/\//, ""); window.location="http://"+query; }

Enjoy and let me know if you have other ideas on how to improve this!

]]>
http://amazing-development.com/archives/2010/05/20/customize-chrome-omnibar/feed/ 2
Buzz… http://amazing-development.com/archives/2010/02/10/buzz/ http://amazing-development.com/archives/2010/02/10/buzz/#comments Wed, 10 Feb 2010 14:35:16 +0000 Frank Spychalski http://amazing-development.com/?p=439 This is mainly a test to see how adding this blog to my Buzz account works. Additionally I want to say how thrilled I am to finally buzz with people outside work ;-)

]]>
http://amazing-development.com/archives/2010/02/10/buzz/feed/ 0
JRuby on appengine with Ubuntu http://amazing-development.com/archives/2010/01/06/jruby-on-appengine-with-ubuntu/ http://amazing-development.com/archives/2010/01/06/jruby-on-appengine-with-ubuntu/#comments Wed, 06 Jan 2010 11:09:20 +0000 Frank Spychalski http://amazing-development.com/?p=426 Overall the instructions on code.google.com are really good, so this is just a dump to remind me of the Ubuntu specific stuff I did on a pristine Ubuntu installation…


sudo apt-get install sun-java6-jdk
sudo apt-get install ruby-full rubygems

This installs only rubygems 1.3.1 but appengine needs 1.3.5.

ERROR: Error installing google-appengine:
bundler requires RubyGems version >= 1.3.5


sudo gem install rubygems-update
sudo /var/lib/gems/1.8/bin/update_rubygems
sudo gem install google-appengine

Et voilà! Ten minutes later I have a running hello world in the cloud ;-)

]]>
http://amazing-development.com/archives/2010/01/06/jruby-on-appengine-with-ubuntu/feed/ 0
pgrep or pkill sometimes do not find process http://amazing-development.com/archives/2009/10/15/pgrep-or-pkill-do-not-find-process/ http://amazing-development.com/archives/2009/10/15/pgrep-or-pkill-do-not-find-process/#comments Thu, 15 Oct 2009 10:07:33 +0000 Frank Spychalski http://amazing-development.com/?p=415 The usual problem: you want to kill a process.

$ ps aux | grep randomprocessname
psycho 20429 0.0 0.0 11824 1580 pts/7 S+ 12:00 0:00 /bin/bash ./randomprocessname
psycho 20528 0.0 0.0 4188 740 pts/17 R+ 12:00 0:00 grep randomprocessname
$ pkill -9 randomprocessname
WTF? Kill that sucker!
$ pkill -9 randomprocessname
No typo... Am I crazy?
$ pgrep randomprocessname
What's wrong?
$ pgrep randomprocessna
20429
$ pkill -9 randomprocessna

For some arcane reason pgrep/pkill matches only the first 15 characters.

]]>
http://amazing-development.com/archives/2009/10/15/pgrep-or-pkill-do-not-find-process/feed/ 2
Android scripting environment supports JRuby http://amazing-development.com/archives/2009/08/04/android-scripting-environment-supports-jruby/ http://amazing-development.com/archives/2009/08/04/android-scripting-environment-supports-jruby/#comments Tue, 04 Aug 2009 06:21:19 +0000 Frank Spychalski http://amazing-development.com/?p=396 Quite some time has passed since the last time I wrote something on this blog, mostly because I did little non-work related worth mentioning.

But last week I helped Damon to finally support JRuby on his Android Scripting Environment (ASE).

  • Downloaded JRuby sources (jruby-1.2.0RC1) from http://www.jruby.org/download.
  • Patched the build.xml to not include doc/index.html from dynalang.jar otherwise dx will complain about an HTML page in the ruby-complete.jar.

    $ diff -r jruby-1.2.0RC1 jruby-1.2.0RC1.patched/
    Only in jruby-1.2.0RC1.patched/: build
    diff -r jruby-1.2.0RC1/build.xml jruby-1.2.0RC1.patched/build.xml
    42c42
    <
    ---
    >
    238c238,240
    <         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar"/>
    ---
    >         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar">
    >           <exclude name="**/doc/index.html"/>
    >         </zipfileset>
    268c270,272
    <         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar"/>
    ---
    >         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar">
    >           <exclude name="**/doc/index.html"/>
    >         </zipfileset>
    387c391,393
    <         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar"/>
    ---
    >         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar">
    >           <exclude name="**/doc/index.html"/>
    >         </zipfileset>
  • Downloaded the JSON sources from http://rubyforge.org/frs/?group_id=953 and put them in lib/ruby/1.8/json/
  • Copied android.rb to lib/ruby/1.8/.
  • Built jar-complete (ant jar-complete) and added jruby-complete.jar to eclipse project.
  • Connected the bits and pieces in com.google.ase.interpreter.jruby

    But beware! The new ASE apk is HUGE (4.6M) and JRuby is fairly slow. But it works ;-)


]]>
http://amazing-development.com/archives/2009/08/04/android-scripting-environment-supports-jruby/feed/ 7
Code reviews work http://amazing-development.com/archives/2009/02/22/code-reviews-work/ http://amazing-development.com/archives/2009/02/22/code-reviews-work/#comments Sun, 22 Feb 2009 20:24:50 +0000 Frank Spychalski http://amazing-development.com/?p=354 Seems like nowadays I only write blog posts in response to other blog articles… But I hope this is better than not writing at all. Ted Neward asks if code reviews do actually work because evidence suggests, that the scientific review process does not.

Only 8% members of the Scientific Research Society agreed that “peer review works well as it is”. (Chubin and Hackett, 1990; p.192).

“A recent U.S. Supreme Court decision and an analysis of the peer review system substantiate complaints about this fundamental aspect of scientific research.” (Horrobin, 2001)

Horrobin concludes that peer review “is a non-validated charade whose processes generate results little better than does chance.” (Horrobin, 2001). This has been statistically proven and reported by an increasing number of journal editors.

But, “Peer Review is one of the sacred pillars of the scientific edifice” (Goodstein, 2000), it is a necessary condition in quality assurance for Scientific/Engineering publications, and “Peer Review is central to the organization of modern science…why not apply scientific [and engineering] methods to the peer review process” (Horrobin, 2001).

Chubin, D. R. and Hackett E. J., 1990, Peerless Science, Peer Review and U.S. Science Policy; New York, State University of New York Press.

Horrobin, D., 2001, “Something Rotten at the Core of Science?” Trends in Pharmacological Sciences, Vol. 22, No. 2, February 2001. Also at http://www.whale.to/vaccine/sci.html and http://post.queensu.ca/~forsdyke/peerrev4.htm (both pages were accessed on February 1, 2009)

Goodstein, D., 2000, “How Science Works”, U.S. Federal Judiciary Reference Manual on Evidence, pp. 66-72 (referenced in Hoorobin, 2000)

This sounds so true to me. I heard way more than one story from Ph.D. students where the professors who were supposed to review papers just forwarded this work to their slaves.

But the fact that academic peer reviews are possibly a failure should not be used to argue against the usefulness of code reviews.

As a reviewee
My first project at Google was written in Python. I had never written a single line of Python before. The feedback I got from the first few reviews helped me learn a lot about Python in a very short time. I don’t know how many times I got these “Yes, this would work but if you replace these 6 lines with that short statement it would work, too” comments.

The same is true for my second project in C++. I have written some C++ before but this was for my Diploma thesis and the code was far from professional. Again the feedback I got from my reviewers helped me learn C++ a lot faster than I would have otherwise. This project was a lot bigger than the first one so I got a few “we already have this implemented here” comments.

As a reviewer
I usually don’t pay that much attention to our coding conventions but my pet peeve is looking out for missing comments. Every time I have to think about a single line of code, this is a pretty good signal that a comment is missing.

Reviewing other people’s code makes sure that I have at least a little knowledge about the areas of our project I do not work on directly.

Conclusion
Code reviews take time and need the proper tool support. But if it is done right, they are useful and help in a couple of different areas:

  • Learning a new language or about new piece of code.
  • Avoiding code duplication.
  • Making sure code is documented.
  • Distribute the knowledge.
]]>
http://amazing-development.com/archives/2009/02/22/code-reviews-work/feed/ 0
Drop all tables from a mysql database http://amazing-development.com/archives/2009/01/31/drop-all-tables-from-a-mysql-database/ http://amazing-development.com/archives/2009/01/31/drop-all-tables-from-a-mysql-database/#comments Sat, 31 Jan 2009 19:19:45 +0000 schlumpf http://amazing-development.com/?p=335 This post was moved to http://ujap.de/index.php/view/DropAllTables.

Please update your bookmarks.

]]>
http://amazing-development.com/archives/2009/01/31/drop-all-tables-from-a-mysql-database/feed/ 3
Looking for an intern http://amazing-development.com/archives/2008/04/25/looking-for-an-intern/ http://amazing-development.com/archives/2008/04/25/looking-for-an-intern/#comments Fri, 25 Apr 2008 13:43:22 +0000 Frank Spychalski http://amazing-development.com/?p=319 Asok the internI am looking for an intern (more details) for later this year. I have a number of interesting ideas for projects, most of them involve Ruby (more specific JRuby), Android and Eclipse. Your skill set should include at least Java and if possible Ruby and/or Eclipse API.

I’m looking for a commitment of at least three months (I would prefer six) and you should be within one or two years of receiving degree. If this sounds interesting please apply here and add a note that you would like to work with Frank Spychalski in Munich.

]]>
http://amazing-development.com/archives/2008/04/25/looking-for-an-intern/feed/ 0
Girl’s day in the office http://amazing-development.com/archives/2008/04/25/girls-day-in-the-office/ http://amazing-development.com/archives/2008/04/25/girls-day-in-the-office/#comments Fri, 25 Apr 2008 09:20:02 +0000 Frank Spychalski http://amazing-development.com/?p=318 Google had a special doodle for the Girl's day
Yesterday was Girl’s day and our office hosted a few girls from schools in and around Munich.

We used Kara to teach them a little bit about programming. You can create finite state machines to control a bug which runs around and tries to solve different problems. The girls did much better than I expected and finished all the exercises we thought would be enough for a whole day before lunch.

Kara screenshot

Kara for Ruby Logo

Without much preparation I decided to teach them a little about “real” programming and Ruby because there is a Ruby version of Kara which lets you write Ruby code to control the bug.

The experiment was very successful. The girls solved all the problems again, this time in Ruby and from their feedback they really enjoyed it.

A couple of years ago I taught a programming course for kids at the Volkshochschule in Karlsruhe. At that time I used Perl (it was a loooong time ago and I didn’t know Ruby then) but if I ever do this again I will use RubyKara.

]]>
http://amazing-development.com/archives/2008/04/25/girls-day-in-the-office/feed/ 0
Ruby demotivator http://amazing-development.com/archives/2008/04/06/ruby-demotivator/ http://amazing-development.com/archives/2008/04/06/ruby-demotivator/#comments Sun, 06 Apr 2008 10:02:49 +0000 Frank Spychalski http://amazing-development.com/?p=316 I found the DIY page for demotivators and had to create one for Ruby. Enjoy!

]]>
http://amazing-development.com/archives/2008/04/06/ruby-demotivator/feed/ 0
EURUKO 2008 Day 2 http://amazing-development.com/archives/2008/03/30/euruko-2008-day-2/ http://amazing-development.com/archives/2008/03/30/euruko-2008-day-2/#comments Sun, 30 Mar 2008 08:42:14 +0000 Frank Spychalski http://amazing-development.com/archives/2008/03/30/euruko-2008-day2/ Second day has started. Today it starts with a few talks on testing…

George Malamidis — „Synthesized Testing“

Already 15min behind schedule, but so far interesting.

This has 4 lines of code. It is already a big ruby function.

Vassilis Rizopoulos — „rutema: One test tool to rule them all“

I’m thinking on how to write in a polite way “This talk was boring”. It was. And the tool uses XML :-( Hey, this is a Ruby conference- you should use YAML or even better a cool Ruby DSL.

Tomasz Stachewicz — „Sharing the load“

Sounded interesting but there was a question after the talk which suggested that the guys reinvented the wheel and that BackgroundDrb is a better solution for what he has done.

Petr Krontorád — „Building Rails Playground – using Ruby’s dynamic nature“

Mumble, mumble, small text, cannot read the slides, mumble… Sorry I don’t have a clue what this talk is about.

Tim Becker — „Lessons Learned Writing Native Extensions“

Type-along tutorial on how to write C extension for Ruby. Very interesting, this could actually make me write C code again… He has started talking on cats and tigers and it seems like he wants to teach us how arrays work in C. Booooooooring. Finally he is done with this and is back on the interesting topics like conversion of data types. Overall a really interesting talk. By far the best one today so far. Tim’s post with code samples and links.

Matt Ford — „Aspect Oriented Programming in Ruby“

It’s his birthday. Happy birthday Matt! He talks about Aquarium a neat aspect oriented programming solution for Ruby. Very nice. I have to play around with this when I’m back home.

Dushan Wegner — „Philosophy & Programming“

This first lightning talk. “Imagine I’m holding a beer and put out this ideas”. “Programmers are better philosophers”. A very cool talk about the similarities of programming and practicing philosophy.

Marcin Raczkowski — „Distributed programming with ruby“

Hard to understand but interesting. Sadly it is impossible to read his code when he is showing examples in the editor.

sorry missed name and title Akira Tanaka – „IO.copy_stream“

Interesting talk about IO in Ruby. Great final “status” slide:

Accepted by Matz yesterday @La fabrica
Submitted today to Ruby 1.9

Wow!

Gregor … — „Context-oriented programming for Ruby“

Took a long time to get to the point. Which part of lightning talk did you not understand.

Florian Gilcher — „Patterns (yet another) pattern matching library“

Interesting talk. Can be found at patterns.rubyforge.org.

Raimonds Simanovskis — „Using Ruby with Oracle“

Good quick talk. I never had to work with Oracle so I never had the problems he was talking about.

Daniel Liszka — „One RubyStack to Rule them All“

Strong accent, to much text on the slides. But sounds like a neat idea… www.bitnami.org/stack/rubystack

Ry Dahl — „Ebb Web Server“

Yet another Ruby web server, obviously it’s faster than all the others because what would be the point otherwise. ebb.rubyforge.org

Wouter de Bie — „Capistrano, Webistrano“

The final lightning talk. I’m hungry :-) off to find some food…

Dr Nic — Demo

So it wasn’t the last talk. They squeezed in a short demo on how to use his gem generator. Very cool! I have to use this to play around with native C extensions.

Final announcement

It seems like next year’s EURUKO will be in Madrid. Great! Never been there. See you next year! It’s not decided yet. Krakow and Warsaw are possible sites, too. Hm, I’m still for Madrid :-)

Sumary

I think I should have slept in today like Todd and would not have missed a bit. Here are some pictures from EURUKO 2008 on Flickr and even one with me. EURUKO was great. A big “thank you!” to all the people who have organized it. I’m sure I will be back next year, no matter where.

]]>
http://amazing-development.com/archives/2008/03/30/euruko-2008-day-2/feed/ 5
EURUKO 2008 Day 1 http://amazing-development.com/archives/2008/03/29/euruko-2008-day1/ http://amazing-development.com/archives/2008/03/29/euruko-2008-day1/#comments Sat, 29 Mar 2008 09:15:30 +0000 Frank Spychalski http://amazing-development.com/archives/2008/03/29/euruko-2008/

The first day of EURUKO 2008 is over.

Yukihiro „Matz“ Matsumoto — „Keynote“

Matz talked about the future of Ruby. It was very interesting. He talked a little bit about the upcoming features (I will link to the slides when they become available) and about the design decisions behind Ruby. For me the most important quote was:

I designed Ruby not to work best but so that people can perform best

Koichi Sasada — „Ruby meets VM“

Koichi explained some details of YARV but some points were lost because a few of his slides were in Japanese.

Favorite quote:

(on his “No Ruby/No Life shirt”) for me it’s No Ruby / No Job

Charles Nutter and Thomas Enebo — „JRuby: Ready For Action!“

Made me download JRuby during the talk :-)

David A. Black — „Per-Object Behavior in Ruby“

I have to reread the slides, because I fell asleep (not due to the talk but to the fact that we are in Prague and had a few beer yesterday)

Nic Williams — „Meta-Meta-Programming with Ruby“

Memorable talk, very funny, great final slide (see @16:35)

Lightning talks session

Two talks on an agile white board and on a Ruby to PHP compiler.

VC with DHH

a little boring, bad sound quality and even worse video

]]>
http://amazing-development.com/archives/2008/03/29/euruko-2008-day1/feed/ 1
EURUKO 2008 — European Ruby Conference http://amazing-development.com/archives/2008/02/26/euruko-2008-%e2%80%94-european-ruby-conference/ http://amazing-development.com/archives/2008/02/26/euruko-2008-%e2%80%94-european-ruby-conference/#comments Tue, 26 Feb 2008 20:21:02 +0000 Frank Spychalski http://amazing-development.com/archives/2008/02/26/euruko-2008-%e2%80%94-european-ruby-conference/ I just found out about EURUKO 2008. It will take plaze in Prague, Czech Republic, on March 29th to 30th. From what I’ve heard are EURUKOs fun events and I would like to go this year if I can find the time especially because of this announcement:

19. 02. 2008 · Matz is coming to EURUKO!
We are very happy to announce that Matz (most probably accompanied by Koichi) is coming to EURUKO! There are currently more than 100 people registered to attend, so thank you all! We will update the website in next couple of days with more details on program, information about sponsors and other stuff.

It has been some time since I used Ruby but it is still my favorite language by far.

Update:

I just registered for EURUKO :-) I will probably go by car so if someone from the Munich area needs a ride, just leave a comment… And a bonus feature: I found this Tech Talk of Matz talking about Ruby 1.9 today…

]]>
http://amazing-development.com/archives/2008/02/26/euruko-2008-%e2%80%94-european-ruby-conference/feed/ 0
JRuby on Android http://amazing-development.com/archives/2007/12/14/jruby-on-android/ http://amazing-development.com/archives/2007/12/14/jruby-on-android/#comments Fri, 14 Dec 2007 03:43:27 +0000 Frank Spychalski http://amazing-development.com/archives/2007/12/14/jruby-on-android/ a red robotToday I tried to run JRuby on Android. I failed. This article is more like a lab report so expect more boring details…

At first I tried the easiest way and added the JRuby jar to my android project. This would have been way to easy and as I expected it did not work.

Then I copied all the JRuby sources into my android project and eclipse gave me more than 100 errors. I had to remove org.jruby.javasupport.bsf.BSFExample and the whole org.jruby.demo package because of dependencies to awt and swing. Now only a single error message was left with a dependency on some class I can’t remember in java.beans. So I downloaded the Java sources and copied the class into my project which gave me a few new dependencies. So I copied the whole java.beans package into the project and removed all dependencies to awt and swing from the code. Now I needed to add only 2 more classed com.sun.beans.ObjectHandler and sun.awt.EventListenerAggregate for eclipse to stop complaining.

a red robotAt this point I encountered my first bug in Android: dx(the compiler for Dalvik) complained about the bsf.jar file which came with JRuby[1]. Fortunately I could work on with the 2.4.0 version of bsf.

At this point eclipse stopped complaining and dx was able to create Dalvik byte code for my test application and package the result.

But when I started the result on the emulator all I got was an exception… This is where I will stop for today and continue whenever I find some time. If someone out there has already successfully used JRuby on Android please leave me a comment on how you managed to do it.

[1] the bug was fixed less than 3h after I reported it. Kudos to the Dalvik team!

]]>
http://amazing-development.com/archives/2007/12/14/jruby-on-android/feed/ 5