Skip to main content

Posts

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

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

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

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

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" : From idea to 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 ...

The Foolproof Git Setup

A confused Git user. There was a recent complaint on Git User mailing list . Quote: Why do I have to be a source control engineer just to be a software developer? Now, the main issue of this poor person is that his organization has failed to on-board him into his job. They told him to use Git, but didn't give him the means to do so productively (as far as we know, anyway). What I started wondering was: Could his employer somehow have set up Git for him so that he could work with it just as easily as with Subversion? Given a prepared .gitconfig with all the aliases and configurations that you wanted, could you really dumb down Git so much that it would be analogous to the simpleness of SVN? Well, here's my take on it: To a certain degree: yes. If you could narrow down Git to do the most typical two SVN commands: update (pull without merging), and commit (with push) .. that would help a lot. Dumbing down pull The first step would be to make git pull as stup...

My résumé in git log

I was helping a friend shape up his CV/résumé recently. Along the way I thought it would be cool to maybe have a bit more original format than the traditional paper, so I tried it out on mine just for fun: $ git log career commit 6f554814186594113ce2060aed3e4240b7fb852e Author: Thomas Ferris Nicolaisen <tfnico@***.com> Date:   Mon Jul 01 11:01:59 2011 +0200     Software developer at Viaboxx Systems commit 1478c77d52fe41ba855fa2181527a7deea480e58 Author: Thomas Ferris Nicolaisen <tfnico@***.com> Date:   Tue Jan 3 10:03:18 2009 +0200     Senior software developer at IP Labs GmbH/FujiFilm Group     - Introduced a range of agile practices, like weekly iterations,        standup-meetings and continuous integration and deployment.      - Lead the first Scrum project, integrating services with FujiFilm        partners across the Atlantic and in Asia. commit 2326593676...

Sharing Git Tips on Coderwall

It's very easy to get side-trekked from blogging by doing stuff on other platforms, like Twitter, StackOverflow and forums. A more recent and inviting platform is coderwall  for sharing #protips (I really hate that term, but, whatever). It looks nice and adds some discoverability for fellow enthusiast on whatever topic you're posting on (which in my case happens to be mostly Git ). Still, I don't want my regular blog readers to miss out on the premium octane knowledge I scatter around the web, so here's a couple of my recent tips I felt like cross-posting (also see the very valuable comments): Shorter Git URLs - Showcasing how you can shorten SSH URLs using ~/.ssh/config Create a random commit - For when you are playing with Git and just need a quick unique commit See which Git command you use the most  - By parsing through your shell history On the last one, I pasted the output into LibreOffice Calc and got myself a nice graph: All my coderwall tips ar...

Git for Insidrrrs

Today I did a quick Git intro for the fine folks at the second Insidrrr Day in Cologne. Photo by Erik Sixt @insidrrr I think it was the first time I ever did a presentation which wasn't purely aimed at programmers, as there were a lot of media/designer types in the crowd. Hopefully I managed to stay away from programming lingo enough for them to grasp what Git is about. The presentation is available here .

Git Stash Blooper (Could not restore untracked files from stash)

The other day I accidentally did a git stash -a , which means it stashes *everything*, including ignored output files (target, build, classes, etc). Ooooops.. What I meant to do was git stash -u , meaning stash modifications plus untracked new files. Anyhows, I ended up with a big fat stash I couldn't get back out. Each time I tried, I got something like this: .../target/temp/dozer.jar already exists, no checkout .../target/temp/core.jar already exists, no checkout .../target/temp/joda-time.jar already exists, no checkout .../target/foo.war already exists, no checkout Could not restore untracked files from stash No matter how I tried checking out different revisions (like the one where I actually made the stash), or using --force, I got the same error. Now these were one of those "keep cool for a second, there's a git way to fix this"situation. I figured: A stash is basically a commit. If we look at my recent commits using   git log --graph --...

Filtering out illegal characters using Guava

The other day, I needed to validate a text-field against a whitelist of characters. Actually, lots of text-fields needed lots of different sets of whitelists, but let's just stick to one for the sake of example. The text field "First name" is only allowed to contain any of these characters:   ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz°Žµ·žŒœŸÀÁÂÃÄÅÆ ÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝ Þßàáâãäåæçèéêëìíîï     ðñòóôõöøùúûüýþÿ .. and the user should be notified with which illegal characters she has entered in the field, if any. The knee-jerk reaction to this kind of logic is regular expressions, but my knee-jerk reaction to regexp is  to avoid it. The above character set probably doesn't fit with any of the predefined regexp notations, so it would probably be nasty anyway. Some  Guava fruits for coloring up this blog post ( image source ) So, let's put Google Guava to some use. It has some nifty utilities for working with sets   and other collect...

Stop using GitX - use GitX (L) instead

I noticed the other day that the Git homepage presents the original GitX as a GUI alternative on OS X. git-scm.com's GUI clients However, development on GitX ceased three years ag o, and while there is an interesting fork from Brotherbard  (development has ceased there as well), the most active continuation takes place in the fork  GitX (L) . The wiki of the orginal GitX  confirms this . A fellow called Erik Blomqvist has put up gitx.org which offers a more balanced view on the various forks. While there might be some value in the simplicity of the old GitX, three years is a long time in Git's development, and GitX is missing out on some newer Git features (like submodules). Anyhow, there are still a number of pages out there that says GitX is still the way to go. People are even still submitting stuff in the bug-tracker , which is awfully pointless, of course. Just keep this in mind next time someone asks you about a good Git GUI for Mac.