Skip to main content

Posts

Showing posts from 2013

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 devices. 

Now, t…

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 Herlandforetold, 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 'mirror/trunk' is not a branch.

Strangely enough, git branch earlier told us that this is a branch. We can even check out the head of it,…

Finally a Book on Google Guava

Well, this was about time:

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 little detail.

So then you're left with looki…

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
    remotes/feat-bar

(Compared to regular remote branches, they look very odd because there is no remote name i…

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?
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 times we get the latest library of master branch and name it with the commit-id in the fi…

What I've Learned After a Month of Podcasting

So, it's been about a month since I launchedGitMinutes, 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 everything was a really go…

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 little.

Also, there ar…

The Stuff You Didn't Get Around To Read

Don't you think it's hard to keep up with everything going on out there?

You probably think there's not enough time in the day to dig into the latest things going on in IT, science, games, sports, politics, finance, or whatever your interests are.

Not to mention all those great books you got off Amazon, which are just stacking up. Maybe you got a Kindle or a tablet to help you get more reading done.

And then there are those 200 videos from that awesome conference on Vimeo for free! Will have to dig through them soon.

In a vain attempt to trick yourself into believing you'll get around to consuming all the material, you star it on Twitter. You tag it for later. You add it to Instapaper. Read Later. Watch Later. An ever increasing backlog of information you want to absorb, but the truth is that you'll never catch up.

What if I were to say: You do have the time. You're just not using it right. You're trying to consume good information, but you're using th…

Microsoft ups their Git efforts another notch

This week Microsoft announced first class Git support embedded in the coming version of Visual Studio.

Now, it's not completely shocking. We could have seen it coming since Microsoft started offering Git repos on CodePlex, and more recently offering a Git client for TFS. In any case, these are some big news. Scott Hanselman weighs on some features and some more background here.

For those who are a bit unaware of what the Git situation on Windows looks like these days, I've dotted down these notes:
Some explanation on these:

msysGit has long been The Way to use Git on Windows. It's basically a port of Git itself, so it's a command-line tool.GitExtensions (includes Visual Studio integration), TortoiseGit, Git Shell, posh-git and most other tools are powered by msysGit.libgit2 is a native library for doing Git stuff. It is developed completely separate from Git itself. The above tools could (and should) probably use libgit2 instead of hooking onto and around msysGit.Github…

The Best Log Viewer Ever

This is what it looks like when I want to have a look through the logfile, to see what a user did on one of our machines one day:


Read the whole story about how it works on the Viaboxx Systems blog (and upvote on DZone!).

The Google Nexus 10: A Review of Sorts

At the end of last year I got a brand new Nexus 10. I also got a Nexus 7 a bit before that, which I'll mention at times for comparison.

I figured it would be a nice challenge to bring it on our Christmas holidays in Norway, and leave my laptop at home for a week. I got a bluetooth keyboard for it, and here are some of my thoughts on using it. Some of these are more Android focused than specific for the Nexus 10.

Disclaimer: This review comes out a bit negative, but don't think that I'm an Apple fanboy. Before acquiring the Nexi I already had a Samsung Galaxy S on which I'm running a rock-solid ICS custom rom. I love the features of Android, and I think all three gadgets are really awesome, all things considered.
Is it a good laptop replacement? It's definitely not a laptop replacement. Granted, it has some great specs, but it still feels way more sluggish than my older little i3 laptop running Windows 7. That probably has more to do with the design of Android than t…

The Company Video Repo

I was recently making a couple of screencasts at work, and they were of the kind that were magnitudes better at explaining that writing the stuff down, or explaining it orally.

I've also been thinking a lot about how companies like Github try to do all their work asynchronously. The prime example for this is the [idea - mockup/spike/code - pull request] cycle, aka. "every change is a pull request":


Now, I've always had a little distaste for electronic communication over things like issue trackers, chat and email when there are so much richer channels available, with face-to-face with whiteboard being the best.

But what if we could just enrich the async channels with this rich media?
A little while ago, I  tweeted that it would be cool to leave a video message or screencast behind with every commit.(Yes, a bit like lolcommits, except it's not just for fun.)

What if we had a repository of videos where it was super easy to upload these things, and reference them in our …