Skip to main content

Posts

Android Voice Commands for Cyclists Listening to Podcasts or Music

Disclaimer: I do not recommend using earphones while on your bike, but there are times or roads where I think it's OK. Pull out your earphones when nearing potentially dangerous situations (like intersections). At least pause the audio. These tips also apply to anyone unable to look at and touch their device, leaving voice commands their only option (useful for visually impaired people, people wearing thick gloves, etc). First of all, you need an Android with a fairly new version of Google Now installed, like Lollipop. You'll need a headset with a microphone button.  I’ve got an iphone headset that works great with my old Moto G, excluding the volume control. You need to make sure that a connected headset can bypass the device’s lock mechanism . It’s in:         Settings -> Language & input -> Google voice typing -> Hands-free Your audio playback software has to work with the Google Now commands. I’ve tried Google Music and BeyondPod ...

The Sweet Spot of Docker

I just stumbled across this  "Ask HN: What is the actual purpose of Docker?" . After using Docker more and more over the last months, my answers have gradually changed. It used to be more hype-like, with "immutable infrastructure", "portable" and stuff like that. Now it's more practical, I feel I can say more concretely what our benefits are. My favorite answer comes down to Docker being a standardized way of deploying and running applications. The old way of deploying our software was complex with a taste of chaos, then became managed but complicated through the introduction of Puppet (or your configuration management tool of choice). I'm hoping Docker will nudge it more towards the simple (quadrant) . How we used to deploy (and still do) - most of these are done through home-made shell scripts we distribute using Puppet: Installing Debian packages (mostly standard packages, sometimes from 3rd party repositories) Dropping WAR files int...

A Better Way to Git Push to Deploy (updateInstead & push-to-checkout)

Wow, nearly a year since my last post. I was sort of thinking it would be something more profound, but here goes: Git recently (with version 2.3) introduced a way of easily pushing changes into a remote non-bare repository, a.k.a. push-to-deploy . The old way would be to have a post-receive hook run some update logic which would do some procedure to update a non-bare repository. There now is a simple way of configuring the target repository to update its work tree instead  upon being pushed to. Now, pushing to the target repo may fail in cases where it has been modified, so soon after, a new push-to-checkout  hook was introduced  to deal with this, but it will only take effect in Git 2.4. I'll show how to set up both below. Surprisingly, when searching for "push-to-checkout", I found very few articles about this, even though it was loudly mentioned on the GitHub blog  ( twice , and on StackOverflow , of course ). So here's another one for the googles. Besides, ...

GitMinutes Taking on a Sponsor

I was a bit unsure whether I should put this post on the GitMinutes blog, but figured I'd rather not mess up the nice episode overview there. I'll share this link via the GitMinutes Twitter and Google+  feeds, and of course everyone listening will hear about it. I am a bit worried that some people will not like that I'm going in a commercial direction with the podcast. Git is an open source project, and all my guests have participated on a volunteer basis. I've received hundreds of micro-donations via Gittip and Flattr , and probably some of the donors expected the show to keep going as an independent thing. If anyone feels hurt by this move, let me know and I'll reimburse your donations at least. The main reason I'm doing this is that I want to create more GitMinutes content. Not only for the podcast, but maybe do screencasts and other stuff as well. I want to engage the community in a lot of new ways, and this will require resources that I don't want...

Managing dot-files with vcsh and myrepos

Say I want to get my dot-files out on a new computer. Here's what I do: # install vcsh & myrepos via apt/brew/etc vcsh clone https://github.com/tfnico/config-mr.git mr mr update Done! All dot-files are ready to use and in place. No deploy command, no linking up symlinks to the files . No checking/out in my entire home directory as a Git repository. Yet, all my dot-files are neatly kept in fine-grained repositories, and any changes I make are immediately ready to be committed: config-atom.git     -> ~/.atom/* config-mr.git     -> ~/.mrconfig     -> ~/.config/mr/* config-tmuxinator.git       -> ~/.tmuxinator/* config-vim.git     -> ~/.vimrc     -> ~/.vim/* config-bin.git        -> ~/bin/* config-git.git               -> ~/.gitconfig config-tmux.git       -> ~/.tmux.conf     config...

Automating Computer Setup with Boxen

I just finished setting up a new laptop at work, and in doing so I revamped my personal computer automation quite a bit. I set up Boxen for installing software, and I improved my handling of dot-files using vcsh , which I'll cover in the next blog-post after this one. Since it's a Mac, it doesn't come with any reasonable package manager built in. A lot of people get along with a combination of homebrew  or MacPorts  plus manual installs, but this time I took it a step further and decided to install all the "desktop" tools like VLC and Spotify using GitHub's Boxen :   include vlc   include cyberduck   include pgadmin3   include spotify   include jumpcut   include googledrive   include virtualbox If the above excerpt looks like Puppet to you, it's because it is. The nice thing about this is that I can apply the same puppet scripts on my Ubuntu machines as well. Boxen is Mac-specific, Puppet is not. It was a little weird to get...

Calling All Programmer Podcasts

One of the reasons why I started podcasting , is that I listen to a lot of podcasts . It took me a long while to build up my podcatching portfolio. For half a year, I listened to mostly gaming podcasts because the only programmer podcasts I knew about was Hanselminutes and Java Posse . I simply didn't know what programmer podcasts were out there . Podcast discovery is about as well established as it was 10 years ago, meaning iTunes . Of course you can blindly google for "<topic> podcast", or you might start off with some recommendations from friends, but there still is no established way of discovering more podcasts of the kind you'd like (1). Another problem is that I see very little cross-pollination between the programmer podcasts. Even though they intersect just the right amount, I never heard  JavaScript Jabber mentioned on TheChangelog , for example (2). To help remedy this I've thrown together all the currently active, English-speaking pr...

Presenting Git for Windows again

A couple of years back I did a talk for the local .Net user group on how to use Git on Windows . I also wrote about my Git setup on Windows . Even though I don't do a lot of work in this environment, I figured I could contribute a lot of good tips and experience as a somewhat seasoned Git user. Since then a few things have happened, so next week I'm heading back to Bonn-to-Code.Net  to refresh their memories on what Git is about, and what has changed since last time. Update: Talk done. Recording and slides can be found here . So what has changed since last time then? Microsoft has fully adopted Git as their (second) version control system of choice. Git projects can be hosted inTeam Foundation Server, as well as on VisualStudio.com  (which is kind of like TFS in the cloud). You can operate Git repositories from within Visual Studio (without installing any extra Git tooling, thanks to libgit2). On the desktop, you can and should still install MsysGit if you'r...

How To Defeat Piracy and Conquer The Movie Industry With One Box

Some weeks ago, a friend of mine was tweeting about the crappiness of DRM and the movie industry. Well, actually I think all my friends have complained about this at one point or another. You know what the problem is (read anything by Cory Doctorow if you need more material). Instead of chiming along as usual, I decided to counter with: "Why don't you as a programmer come up with something better yourself?" The discussion that ensued gave me an idea for a business/product that I'll share here. Feel free to steal the idea and build the "BetaBox"! Imagine we built a solution for buying movies & series with all the problems of today's services removed. Imagine Hulu or Netflix, only with *all* movies and series, not just crappy old ones. It's not like Spotify is dominated by music from the 80-90's, and the newest songs are from two year's back, right? Additionally, all content can be streamed or downloaded onto all your various de...

More git-svn Woes

I was pretty happy with myself after I figured out to always use git-svn with the --prefix configuration . However, as  +Johan Herland   foretold , this stopped working after Git 1.8.3.2. Or to be precise, the convenient branch checkout/tracking mechanism stopped working. So while you could do this before (imagine a fresh git-svn clone with --prefix=mirror/ ): >git branch -a                                         * master   remotes/mirror/trunk #this is a svn remote > git checkout trunk   Branch trunk set up to track remote branch trunk from mirror. Now, after upgrading Git past Git 1.8.3.2, you'll get this instead: > git checkout trunk error: pathspec 'trunk' did not match any file(s) known to git. Even if you try doing it more explicitly: >git checkout -tb trunk mirror/trunk fatal: Cannot setup tracking information; starting point '...

Finally a Book on Google Guava

Well, this was about time: Google Guava at PacktPub TL;DR: There's a little book about Guava out. I've had a quick look through it and it looks mighty fine. Earlier this week I got an offer to review this new book on Google Guava. For those of you who don't know Guava, I dare say it is the finest utility tool-belt library available for Java development. The author, Bill Bejeck , hasn't been involved with the development of Guava, but he has blogged some articles on the subject in the past . What I've read so far in the book speaks that he knows what he's talking about. Why do you need a book about Guava? Now, Guava is a library where you can only fully immerse yourself by reading through all of the JavaDoc, and in the first few rounds of doing so you probably won't understand half of it. What you can do instead, for starters, is to read through the GuavaExplained wiki pages , which offer a much nicer reading experience, but go into very littl...

Always use git-svn with --prefix

TLDR: I've recently been forced back into using git-svn, and while I was at it, I noticed that git-svn generally behaves a lot better when it is initialized using the --prefix option. Frankly, I can't see any reason why you would ever want to use git-svn without --prefix.  It even added some major simplifications to my old git-svn mirror setup . Update : Some of the advantages of this solution will disappear in newer versions of Git . For example, make a standard-layout svn clone: $ git svn clone -s https://svn.company.com/repos/project-foo/ You'll get this .git/config : [svn-remote "svn"]         url = https://svn.company.com/repos/         fetch = project-foo/trunk:refs/remotes/trunk         branches = project-foo/branches/*:refs/remotes/*         tags = project-foo/tags/*:refs/remotes/tags/* And the remote branches looks like this (git branch -a):     remotes/trunk ...

Considerations for JavaScript in Modern (2013) Java/Maven Projects

Disclaimer: I'm a Java developer, not a JavaScript developer. This is just what I've picked up the last years plus a little research the last days. It's just a snapshot of my current knowledge and opinions on the day of writing, apt to change over the next weeks/months. We've gone all modern in our web applications, doing MVC on the client side with AngularJS or Ember , building single-page webapps with REST backends. But how are we managing the growing amount of JavaScript in our application? Yeoman 's logo (not necessarily the conclusion of this blog post) You ain't in Kansas anymore So far we've just been doing half-random stuff. We download some version of a library and throw it into our src/main/webapp/js/lib , or we use it from a CDN , which may be down or unreachable when we want to use the application.. Some times the JS is minified, other times it's not. Some times we name the file with version number, other times without. Some ...

What I've Learned After a Month of Podcasting

So, it's been about a month since I launched   GitMinutes , and wow, it's been a fun ride. I have gotten a lot of feedback, and a lot more downloads/listeners than I had expected! Judging the numbers is hard, but a generous estimate is that somewhere around 2000-3000 have listened to the podcast, and about 500-1000 regularly download. Considering that only a percentage of my target audience actively listen to podcasts, these are some pretty good numbers. I've heard that 10% of the general population in the western world regularly listen to podcasts (probably a bit higher percentage among Git users), so I like to think I've reached a big chunk of the Git pros out there. GitMinutes has gathered 110 followers on Twitter, and 63, erm.. circlers on Google+, and it has received 117 +'es! And it's been flattr'ed twice :) Here are some of the things I learned during this last month: Conceptually.. Starting my own sandbox podcast for trying out everythin...

Announcing GitMinutes - a Podcast for Git Users

I'm a bit late to my own party here, but I've launched a podcast called GitMinutes . If you've been listening to my amateur/sandbox podcast tfnico's rants , you knew about this already, but now I finally got around to properly flaunt it on my own blog. Why GitMinutes? It's an obvious rip of Scott Hanselman's Hanselminutes , but hey, he nicked This Developer's Life from This American Life . I think GitMinutes has a great ring to it, it's easy to spell, and it had zero hits on Google before I started this. But why a whole podcast about Git? I'll admit it is a fairly narrow scope. But I was listening to a few technical podcast episodes lately that were about Git, and I wasn't really happy with the substance of it. Also, I was recently approached about writing a Git book, but I figured that I could make something cooler than a book instead. Also, there aren't enough technical podcasts for me to listen to, so I decided to add a lit...