‘Planet’ Category

  1. What worries me about Scala

    May 4, 2012 by Eduardo Gonzalez

    I’ve recently been rediscovering podcasts.  I’m particularly fond of the NodeUp podcast, but I also listen to podcasts about Rails, Clojure, and Scala.  The Scala podcast is by far the most academic; taking a shot every time they say the word “type” makes for a pretty nice drinking game.

    I must admit I like academic and theoretical discussion as much as the next guy, but I worry about how little attention is paid to practical matters.  NodeUp on the other-hand is almost completely about practical things: libraries, frameworks, scaling, deployment, etc.  I’ve found them all to be pretty informative.  The Rails podcast is also fairly practical, but they do tend to cover object-oriented design patterns from time to time.  I admit that JavaScript and Ruby aren’t exactly paradigm-shifting languages, but still, programming is about more than just the mathematics.

    For example, the Scala world has two great web frameworks: Lift and Play.  It would be nice to hear how they feel, not just about how type safe they are.  Granted type safety is one of the main reasons I’m interested in Scala over node/ruby, but programming is about tradeoffs.  Things like programmer productivity anecdotes are really worth something to new-comers and are a great fit for a discussion-centric medium like a podcast.

    If Scala is going to become a mainstream language, there needs to be more discussion on these touchy-feely and practical subjects. If you know any, please let me know in the comments.  Podcasts about Scala are really hard to find.


  2. My first Arduino

    February 8, 2011 by Eduardo Gonzalez

    Yesterday my wife decided to buy yet another sewing pattern book and I decided to tag along.  As a Kindle user, there’s usually very little for me to do at a bookstore.  I usually just look around the IT section of the magazine rack and thumb through the amazing Ubuntu magazine, or Nikkei Linux.  This time though, a magazine called “Otona no Kagaku” caught my eye.

     

     

    “Otona no Kagaku” is magazine that comes with some kind of sience related device inside that you can put together.  There were all kinds of projects from synthesizers to airplanes, all sorts of fun.  Kids today are so lucky, I wish I had a magazine like that when I was a kid.

    Anyway I’m too old for most of them to be interesting but one of them came with an Arduino board (branded as “Japanino”).  Since the magazine cost about as much as a new pre-assembled Arduino + shipping I decided to buy it.  The magazine is filled with a bunch of projects other than the one on the cover and explains how to go about doing them.  It’s amazing all the cool things people are doing with the Arduino. One guy uses an array of Arduinos to electricute himself in the face it seems.  To each his own I guess.

     

    The Persistence of Vision project was really simple to set up.  Just a few screws and the website had all the software you needed already.  Here’s what the finished product looks like.

     


    The IDE is really simple.  It’s amazing how low the bar is to get code onto these things.  Way back when (circa 2005) I still had to build a cross-compiler environment.  The language is like a C version of Processing, which is really intuitive and gets rid of having to write a boiler-plate event-loop in the main function.

    Now I’m thinking about what to do next.  At work I’ve been experimenting with a presence system based on bluetooth which automatically locks the computer when I’m out of range.  Unfortunately Bluetooth has a pretty long range.  I wonder if there’s any NFC shields for the Arduino.  It’d be pretty cool if you could use your phone as a smart-card via NFC.

     

     


  3. Announcing Better Mail

    December 14, 2010 by Eduardo Gonzalez

    About a year ago I bought the first Android phone available in Japan for the sole reason of making apps. Unfortunately I’ve had very few itches that needed scratching.

    About a month ago that changed, because the built-in Gmail app has a fatal flaw.

    The Problem

    If you temporarily lose connectivity while sending an e-mail, the e-mail gets stuck in a “Sending…” limbo.  There’s no way to re-send the message.  It’s not even possible to edit the message.  It’s not in the outbox, and not in the sent folder.

    When OhLife first started I spent 30 minutes writing my first journal entry.  Unfortunately I’ll never get to read that post again because it never finished sending.

    Also the native app doesn’t support Japanese emoji.  Which means that sometimes I get what looks like blank e-mail from my wife or my friends which were actually just full of emoji.

    I decided to do something about it.  So I started using the Gmail mobile web app which doesn’t have this problem. Pretty soon however I started to miss the integrated experience of the native app.

    My Solution

    Better Mail is a native android app with a WebView hardcoded to mail.google.com.  But that isn’t all, it also listens to the same new e-mail broadcast as the Gmail app.  It will notify you of new e-mail without a constantly running background process.  It also includes a native menu so that you can navigate without having to scroll all the way to the top. Also, since Better Gmail is a separate application it stays in memory longer than a web-page would which makes it much less painful to use.  I also took the time to fix some of my pet-peeves with Gmail’s notification style. For example, I added a “Quiet Mode” feature that automatically turns off sounds and vibrations when you get new e-mail at 2 in the morning.

    The Price

    A buck.  Making this application wasn’t trivial, since I had to do some reverse-engineering.  While the die-hard Free Software nut inside me has some reservations about using DRM, it does improve performance a bit.  And performance is the biggest problem.

    I have a lot of ideas in the pipeline that I could work on if there’s enough interest.  Eventually I would like to try injecting my own javascript code into the page to provide an even deeper level of integration.

    Update:

    I’ve decided to work on bigger and better things.  The code is now Open-Source (GPL) and available for free!

    The Future

    This app is definitely a minimum value product, there’s plenty of room to expand.  If anyone has a feature request let me know via e-mail or in the comments.


  4. How To Get etags Working in Emacs

    December 9, 2010 by Eduardo Gonzalez

    You’ve been using Emacs for how long and you haven’t figured this out yet?

    Yup.  Up until now I’ve never really needed to actually get etags working in Emacs.  I remember trying to figure it out long ago as a newbie and giving up.  It’s initially difficult because it’s not as simple as just saying “etags my-src-dir”, though once you have a couple of UNIX tools on your utility belt though, it’s practically as simple as “etags my-src-dir”.

    Just show me the code.

    Although there might be other more correct ways to do this, the following works fine for PHP:

        cd ~/src-code-top
        find . -name '*.php' -print | xargs etags

    Woah find and xargs?

    etags (unfortunately) only works on files and not directories.  Those files also have to be arguments and not stdin.  So we need to use find to give us a list of file names and xargs to convert each filename into an argument for etags.

    Explain find.

    find is a swiss army knife of file search but mostly you can just memorize “find . -name ‘*.filetype‘ -print”.  find needs 3 arguments, the directory to start looking in, some condition, and some action. The “.” tells it to look starting from the current directory. The “-name” part means find matching filenames (We use the single-quotes to keep bash from expanding). Finally -print tells it to print what it found one line at a time.

    Explain xargs.

    xargs takes lines from stdin and supplies it as the arguments to some other program.  Just what we need for etags. Although xargs is as versitile as find we don’t need to supply it with anything, the default behavior is fine.

    Ok, now how do I use it in Emacs?

    Just use M-x visit-tags-file and point it to your newly minted TAGS file.  After that you can easily find out where the hell that class/function is hiding just by doing “M-.” (You can also return to the file you came from by pressing M-*).  Of course “M-.” and “M-*” work in a stack like manner so you can keep “M-.”ing to dig as deep as you need to and easy get back by pressing “M-*” and equal number of times.


  5. An Idea

    February 23, 2008 by Eddie Gonzalez

    Lately I’ve been dreaming up of a window manager that could help me stay focused on a single thing by keeping me from multi-tasking. In the spirit of programs like writeroom and pyroom.

    • It would always display windows in full screen mode.
    • To do any action it would require you to type in a random string of characters.

    The reason for having to type in the specified random string of characters is to give some weight to moving to another window. It might remove my desire to “just check if there’s any e-mail”, which usually turn into big distractions wasting time I don’t have. Yet it still makes switching to a Firefox window with some research possible.


  6. Valentine's Day

    February 16, 2008 by Eddie Gonzalez

    I got Valentine’s day Chocolate from my Girlfriend!  I’m so happy. :-)   It’s a box from Kobe Morozoff.  The company that brought Valentine’s Day to Japan.

    I need to work double hard now to work off the calories.  f^_^;


  7. LaTex

    February 10, 2008 by Eddie Gonzalez

    It’s amazing how far a little LaTeX can take you. Even if you’re just writing an MLA style paper.

    Here’s some packages to get you started:

    After installing those packages you can learn how to make an MLA style paper by reading the readme file at:

    /usr/share/doc/texlive-latex-extra/latex/mla-paper/README

    If you are making a regular CS paper/report/dissertation then the example LaTeX file is the best example to go on. Try a Google search for “LaTeX Example” for some good ones.

    I use Emacs as my editor which is pretty tough for most people but I think that it’s worth it if you learn how to use org-mode. Then you can C-x 3 (Vertical Split Screen) in Emacs and open a notes.org file right next to the text. Then you can have an outline right at your finger tips, that you can modify/show/hide in various ways.

    I also recommend adding the following line to the top of your .tex file:

    % -*- mode:latex; mode: flyspell; mode: auto-fill -*-

    It’ll turn on flyspell and auto-fill mode for you.

    My LaTeX documents are organized into a directory structure like this

    ~/<class name>/<essay title>/
    	essay.tex
    	essay.bib
    	notes.org
    	Makefile

    I keep a skeleton folder with those three files in it. And to make a new essay I just copy and paste it with a new name.


  8. Integrating Qt3 programs in Ubuntu

    February 1, 2008 by Eddie Gonzalez

    If you’re like me and have discovered a couple of kick-ass Qt applications and are wondering how to make Qt programs look more like the default Ubuntu Human theme, I present you with a quick cheat sheet.

    There’s luckily one KDE style available in the Ubuntu repositories that only depends on Qt, polymer. But the colors it uses are different from the Ubuntu colors, so here’s how to get them pretty close.

    First you’ll need to install a couple of packages. You can either click on these links or search for them using synaptic.

    Once you have them installed you can find qtconfig in System>Preferences>Qt3 Configuration.

    First change the style to Polymer. Then click the Tune Palette. Here’s the colors that I used:

    • Background: Red: 239 Green: 235 Blue: 231
    • Button: Red: 245 Green: 242 Blue 239
    • Highlight: Red: 219 Green: 154 Blue: 86

    You can change the color by clicking on the change color button when and inputing these numbers in the window that pops up.

    Once you’ve changed those three, close the Tune Palette window and go to File>Save.

    Now your installed Qt apps will blend in a lot better with your other GTK applications.

    Here’s what it’ll look like:

    Virtual Box OSE screenshot


  9. Opera Mini 4

    January 20, 2008 by Eddie Gonzalez

    I Just installed Opera Mini on my Treo 650. It’s pretty amazing. Not exactly a safari but good enough, and much faster than the browser the Treo comes with. It’s pretty amazing that this Java app can out-perform the C-based Blazer browser by what feels like an order of magnitude.


  10. Quote

    January 4, 2008 by Eddie Gonzalez

    I think Mark really hit the nail on the head with this sentence he used on a recent blog post on Inkscape changing to Launchpad for bug tracking.

    “We don’t have money on our side, but we do have the power of collaboration.”

    - Mark Shuttleworth

    I’ll definitely be using it in presentations and talks about Free Software.