Aside

Fixing a slow UI of a Java application running on Windows 10 in VMware Fusion

When maintaining systems for customers, I regularly use Windows 10 for VPN’ing to their systems and DbVisualizer for querying databases. However, recently the DbVisualizer user interface (UI) became sluggish and with what seemed like very slow refresh rates.

I suspected that some programmatically changed 3D settings of the virtual machine running in VMware Fusion or the settings in Windows 10 could be to blame, and I tried changing them systematically, but to no avail.

I then turned to tuning the Java VM graphics-related parameters and found that adding the following property (and restarting DbVisualizer) did the trick:

-Dsun.java2d.noddraw=true

Now, DbVisualizer is again speedy as I don’t know what. 

Aside

Troubleshooting “detected broken kqueue” on macOS

When attempting to compile a program using the Crystal compiler on macOS Sierra 10.12.1, I ran into the following error:

[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I solved the problem by reinstalling libevent:

brew update && brew reinstall libevent

…and then reinstalling the Xcode command-line tools:

xcode-select --install

Afterwards, I was able to run crystal -v and compile my program without any errors. 

Sources

https://github.com/Homebrew/homebrew-core/issues/2869

Aside

What to do when an external hard drive won’t mount on OS X

I recently experienced the that my external Western Digital My Book hard drive wouldn’t mount the WD Unlocker partition (for encrypted drives) on Mac OS X as it usually does.

Skimming though the console logs, I found a rather disturbing error message that described why the partition couldn’t be mounted:

28/07/2016 20.48.34,000 kernel[0]: disk2s0s2: alignment error.

After doing some googling, it seemed as if the disk was toast: in some forum posts, WD staff suggested that people should get the disk replaced if they experienced such errors. In other threads, it would seem that people suddenly experienced the error after upgrading to OS X 11.something.

Apparently, it all relates to the partition table information somehow being in an inconsistent/erroneous state, and OS X thus not being able to read the disk at all. OK, so OS X not being able to read the data, let alone not being able to fix the problems, is bad enough by itself, but the thought of not being able to recover the data on the disk at all was pretty annoying.

Luckily, I have had great experiences with installing file system drivers for various non-native file systems in different operating systems, and I thought that installing a driver for OS X’s HFS+ on a Windows box, and attaching the external hard drive to it, just might do the trick, as the driver, and the way that the operating system would access the disk might be different from what OS X does natively.

So, I installed the HFS+ driver for Windows 10 from Paragon Software, and after connecting and unlocking the drive with the Windows-based WD software, the HFS+ partitions showed up, and I was able to access the data without any problems whatsoever. Afterwards I tried reconnecting it to OS X, and the WD Unlocker partition showed up just as it had before the error.

Aside

Connecting DbVisualizer to Heroku Postgres

DbVisualizer is a fantastic cross-platform database client, and I wanted to connect it to a Heroku Postgres instance I just spun up.

Postgres on Heroku is SSL-enabled with self-signed certificates, so for the connection to work in DbVisualizer, I had to define two special driver properties for the PostgreSQL JDBC driver:

  1. ssl was set to true
  2. sslfactory was set to org.postgresql.ssl.NonValidatingFactory

Observe the screenshot below to identify the configuration of the properties:

Screen Shot 2016-06-05 at 13.18.40

 

Sources: http://bartling.blogspot.com/2013/06/connecting-dbvisualizer-to-heroku.html and https://devcenter.heroku.com/articles/connecting-to-heroku-postgres-databases-from-outside-of-heroku

Exploratory Ruby-magic with the iRuby Notebook

Learning the programming language Ruby can be a wonderful experience. The language is elegant and well-designed, promoting the use of eloquent and very human-readable programming constructs. Also, it speaks to my aesthetic sense in its syntactic simplicity and no-nonsense approach.

Personally, I learned Ruby through why the lucky stiff’s “The Poignant Guide to Ruby”, the Rails handbook, the Ruby Pickaxe book, and a lot of chatting on IRC. At the time there weren’t that many available screencasts (and no MOOCs), which, fortunately, has changed since then.

I like the idea of learning new programming languages ever so often, as it expands and enriches my way of thinking and creativity related to problem solving in the software domain.

Learning can be done in a lot of ways, and I have found that note-taking is an important activity for efficient learning during my personal learning endeavors. However, I’ve always felt like there was some gap between the notes I was taking about programming and the code and examples that I wanted to go with them to completely support my comprehension (especially after some time). You know, runnable code and notes intermixed.

Sure, you can make a Ruby-script and insert a lot of comments, but I’m more of the aesthetic type, so I wanted to be able to throw different fonts, graphics etc. in there. What to do?

Lo and behold! On the O’Reilly Strata + Hadoop World conference in New York, iPython and iPython Notebook was presented, and was is exactly what I have been longing for: Notebooks mixing HTML/Markdown, graphics and, not least, runnable Ruby code.

While installing iPython I ran into some problems, so here’s an end-to-end installation guide using Brew on Apple OS X:

 $ mkdir iruby # Create a new directory
 $ echo 'iruby' > iruby/.ruby-gemset # Define the Gemset to use
 $ echo 'ruby-2.2.0' > iruby/.ruby-version # Define the Ruby-version to use
 $ cd iruby # cd into the directory
 $ brew install zeromq # Install the libzmq dependency
 $ sudo pip install ipython pyzmq jinja2 tornado # Install Python dependencies
 $ gem install iruby pry rmagick rubyvis gruff # Install iruby and other Ruby goodness
 $ iruby notebook # Start iRuby Notebook
 
Status

Attending Strata+Hadoop World NY 2014

If you’re the slightest bit interested in data science, big data and everything in between, you should definitely visit one of the Strata+Hadoop World conferences.

With great speakers showcasing stories from the trenches, and industry-leading exhibitors demonstrating their impressive software, I’m having a blast here at Strata+Hadoop World NY 2014.

If you can, make room for yourself at Strata+Hadoop World Barcelona! I can promise that you won’t regret it. 

Ahoj Gamutron

Being a software guy, I pondered what technology this blog should be built with.

I love the Ruby programming language for its brevity and succinctness (amongst others), so some Ruby-based CMS-platform would have been the natural choice.

However, a static website generated by something (like Jekyll) would also have its charms (most of which would mostly be recognized by its author, I’m sure). Really, the choices don’t limit themselves to just Ruby, as also Scala, Python, Go, Erlang, and many others (JavaScript and Node.js included) are technologies with which I would love to fiddle in building a blog.

As I believe that one of the key traits of any person involved in producing technology-based products should be pragmatism, applying this trait to my thought process led me to good old WordPress; the battle-proven blog software that allows you to focus on getting things done (i.e. blogging) instead of voluntarily venturing down a rabbit hole of tech fetichism while reinventing the genre with new and fantastic software (and, admitted, most software geeks secretly dream of doing so).

I like WordPress, I really do, and I think it’s one of the best products ever produced by the open source PHP community – well, perhaps even by the open source community as a whole, I would argue. It has an efficient and well-designed UI, slick workflows and a large community of developers backing it, and the complete package that WordPress constitutes has helped a whole generation of internet users get their own voices heard world-wide.

So, for now being very mature and pragmatic in having chosen WordPress to power this site, I’m free to venture down into all the other gorgeous and geeky rabbit holes that I can think of (and that’s a lot).