For several years, I've been using blogspot.de for my blog. But since I really don't like web-based editors (I'm a hardcore vim user), I've decided to switch to static site generation using Jekyll.
To make a long story short: this blog has been moved to
https://blog.webapps.inreoh.de/
Sonntag, 19. November 2017
Samstag, 7. Oktober 2017
No more KeePassX / KeePassXC woes
KeePass is an amazing tool for storing passwords in a secure manner, but syncing password databases across multiple devices can be somewhat challenging.
For several years, I've used
- MiniKeepass on iOS
- KeePass + Mono on OS X
- Dropbox for syncing
and was quite content with this combination.
But since KeePass is not very well integrated in OS X, I decided to switch to KeePass X. This seemed ok at first glance, but recently I noticed that several entries I had created in MiniKeepass were missing in KeePassX 😕. I then tried KeePassXC, with the same result.
I still haven't found the root cause - it might be a manifestation of https://github.com/MiniKeePass/MiniKeePass/issues/136 or a similar (more recent) bug in MiniKeepass, but I haven't found time to investigate this.
For the time being, I switched from KeePassX / KeePassXC to MacPass.
It's also Open Source, and it seems to be able to handle alle entries created by MiniKeepass.
For several years, I've used
- MiniKeepass on iOS
- KeePass + Mono on OS X
- Dropbox for syncing
and was quite content with this combination.
But since KeePass is not very well integrated in OS X, I decided to switch to KeePass X. This seemed ok at first glance, but recently I noticed that several entries I had created in MiniKeepass were missing in KeePassX 😕. I then tried KeePassXC, with the same result.
I still haven't found the root cause - it might be a manifestation of https://github.com/MiniKeePass/MiniKeePass/issues/136 or a similar (more recent) bug in MiniKeepass, but I haven't found time to investigate this.
For the time being, I switched from KeePassX / KeePassXC to MacPass.
It's also Open Source, and it seems to be able to handle alle entries created by MiniKeepass.
Freitag, 30. Dezember 2016
Chromecast setup - not as easy as promised
Today, I bought a Google Chromecast for a friend of mine. The leaflet promises setup in three easy steps:
- connect to power and TV (via HDMI) => ok, no problem
- switch the source on your TV to the chromecast => ok, the splash screen asks you to open chromecast.com/setup to complete the setup
- open chromecast.com/setup => doesn't work at all - apparently, the chromecast fails to perform a DNS lookup for itself (sic!)
Freitag, 9. Dezember 2016
Unit testing PL/SQL stored procedures with JRuby (Part I)
Synopsis
My PL/SQL code that's running on Oracle doesn't have proper unit tests so far. The main reasons for this are- lack of tooling (neither utplsql nor QuestCodeTester nor the SQL Developer built-in has satisfied me so far)
- lack of time (lame excuse, I know)
So I decided to once more tackle the problem.
Past experiences
Until now, I've tried the following approaches:utPLSQL
Pro
- runs directly in the database => no additional setup necessary- syntax errors in the unit tests / procedure calls are caught by the compiler
- same language for Code Under Test and unit tests
Con
- PL/SQL is quite limited in its expressiveness- Integration in a CI environment for automatic builds / reporting build failures requires additional work
MRI Ruby with oci8 and Cucumber Spec files
Pro
- Ruby (it's such a wonderful language, really)- Gherkin syntax for spec files
Con
- complicated deployment in CI environment (requires at least an Oracle instant client installation)- even more complicated to set up on Windows (requires Devkit to compile the native extension oci8)
.NET with SpecFlow
Pro
- excellent IDE (Visual Studio)- Gherkin syntax for spec files
Con
- Windows only (although Mono might be viable, but setting this up with ODP.NET / Oracle client seems quite complicated)- C# is quite verbose (F# might be an alternative, though)
Java with Maven, JUnit / Cucumber-JVM
Pro
- real cross-platform- easy deployment (no need for the Oracle client - just include ojdbc7.jar)
- Gherkin syntax for spec files
Con
- Java is incredibly verbose (Scala / Kotlin might be an alternative, though)- Maven (enough said)
A new horizon
Requirements
My new solution should be:- easy to deploy (no full-blown Oracle client necessary)
- really cross-platform (Windows, Linux, Mac OS X; Docker integration not strictly necessary, but would be very nice)
- joyful (this excludes Java as a language, Maven as a build tool, and several others)
Choice
For now, I'll go with:- JRuby (Ruby + JVM = dream team)
- Gradle (although I might switch to Rake)
- RSpec (although I might switch to Cucumber if I want a more high-level solution)
Dienstag, 19. Juli 2016
Oracle JDBC + Maven - how (not) to do it
Warning
This post is somewhat of a rant - if you are affiliated with Oracle corp, you might want to avoid reading the rest.The goal
I wanted to write a simple Java application that demonstrated property based testing for a PL/SQL function in an Oracle database.The facts, and some assumptions
Oracle database is owned by Oracle corp.Java is owned by Oracle corp.
Maven is the de-facto standard for building Java applications.
Therefore, one might assume that using Maven to build a Java application that connects to an Oracle database is pretty straightforward - just include the relevant dependency in your POM. After all, it's just a JDBC client, right?
RIGHT?
Nope.
Welcome to the wonderful world of Oracle, where lawyers, usage restrictions and stupid license agreements are king and developers are ... not really welcome.
You either have to
- download the jar file from Oracle's website (and acknowledge that you're legally entitled to download it), register with Oracle and say yes to their proprietary license agreement
- install the jar file locally with maven
or
- use the Oracle maven repository (which - again - requires you to register with Oracle and acknowledge their proprietary license agreement)
- store your username + encrypted password in a settings file
The conclusion
Never use Oracle products for hobby projects, especially not the database. It's just not worth the hassle.Dienstag, 24. Mai 2016
vim Cheatsheet
Code formatting
gg=G format current fileProcessing text through external commands
Use the ex command ! for thisExample
:!sortThis will sort the current selection.
Donnerstag, 18. Februar 2016
Getting rid of those pesky non-breaking spaces (U+00A0) on MacOS X
A problem that's been bugging me for quite some time was that for no obvious reasons, source code I entered broke on space characters. Removing the space characters and re-entering them usually fixed the problem.
Finally, iex (the interactive Elixir shell) gave me a clue to what was really going on:
iex(11)> [ 65 ]
** (SyntaxError) iex:11: unexpected token: " " (column 5, codepoint U+00A0)
DuckDuckGoing for U+00A0 quickly revealed that U+00A0 is a non-breaking space (or nbsp). To show the offender in vim, put this in your .vimrc:
" show those darn non-breaking spaces aka U+00A0
set list
set listchars=nbsp:.
But to really get rid of the problem, you can just remap the combination Alt+Space (which inserts the nbsp) to a plain ol' space (shamelessly copied from StackExchange):
- create the directory ~/Library/KeyBindings/
- create a new file DefaultKeyBinding.dict in this directory
- add the following entry to this file:
{
"~ " = (insertText:, " ");
}
Finally, iex (the interactive Elixir shell) gave me a clue to what was really going on:
iex(11)> [ 65 ]
** (SyntaxError) iex:11: unexpected token: " " (column 5, codepoint U+00A0)
DuckDuckGoing for U+00A0 quickly revealed that U+00A0 is a non-breaking space (or nbsp). To show the offender in vim, put this in your .vimrc:
" show those darn non-breaking spaces aka U+00A0
set list
set listchars=nbsp:.
But to really get rid of the problem, you can just remap the combination Alt+Space (which inserts the nbsp) to a plain ol' space (shamelessly copied from StackExchange):
- create the directory ~/Library/KeyBindings/
- create a new file DefaultKeyBinding.dict in this directory
- add the following entry to this file:
{
"~ " = (insertText:, " ");
}
Abonnieren
Posts (Atom)