[Scala] Implicit Manifest tip

Posted by Ktoso under coding, english, scala (1 Respond)

Hello again! Today I’d like to show a nice little trick you can do in Scala to make your methods look more “like Scala”, and require less typing :-) Let’s take a look at the two methods bellow: // before: val cookie = unmarshall(classOf[Cookie], jsonRepresentingACookie)   // which is the same as the bellow sample [...]

Tags: , , , ,

[JDK7] java.util.Objects – forgotten feature?

Posted by Ktoso under coding, java (1 Respond)

This time just a quick post about something I’d really want to share with you all, and that’s been kind of forgotten during the release of JDK7 – java.util.Objects! Be sure to check out it’s javadoc to see what this small helper class can do for you :-) We’ll focus on two of it’s methods. [...]

Tags: , , , , , ,

[terminal heroes] Display git branch in shell prompt (PS1)

Posted by Ktoso under english, fun, guide, terminal heroes (2 Responds)

I don’t think I’ve blogged about this but I’ve seen this sometime ago and now decided to add it to my .bashrc for good. It’s a simple trick to make an awesome PS1 shell prompt, displaying the branch you are currently on (if you’re in a git versioned directory). Not that I’m forgetting what branch [...]

Tags: , , , , , , , ,

[release] maven-git-commit-id-plugin

Posted by Ktoso under coding, english, freedom, fun, guide, java (15 Responds)

Yup, today I’m releasing yet another piece of cool free software! It solves a problem we’ve had at our company, the tester tometimes tested stuff that wasn’t deployed yet, and the developers thought it was deployed and this caused some weird situations sometimes. Using the plugin I’ve written, we’re able to expose “which version is [...]

Tags: , , , , , , , , , ,

[PL] Trzeźwe spojrzenie na: CoFoJa (Design By Contract form Google)

Posted by Ktoso under coding, java (1 Respond)

Design By Contract Dzisiejszy wpis będzie o znanej i generalnie dość znanej i mającej wiele zalet metodyce Design By Contract. Temat “wypłynął” ponownie dla wielu javovców tym razem dzięki wydaniu biblioteki  CoFoJa (o którym właśnie będzie ten post) przez dwóch pracowników Google przy ścisłej współpracy z autorem pierwowzoru tego projektu. Dlaczego jednak nietypowy tytuł posta [...]

Tags: , , , , , ,

git: “befriend” an existing and a remote branch

Posted by Ktoso under null (No Respond)

Ok, time for another quick post about git. By “befriend” in the title I mean “make them track the same changes” or something like “tell git that it’s the same branch”* (not the “same” but you can get the idea from that sentence). Bellow is an quick flow over why you might need such an [...]

Tags: , , ,

Don’t use += loops on Strings for duke’s sake…!

Posted by Ktoso under coding, java, polish (2 Responds)

It’s always kinda shocking to see that such easy tasks, and what I’ve always thought to be “common knowledge“, are not that common among some students… One such thing is always using the += on strings in Java… C’mon, everybody knows that + and += are horribly slow. Yeah, I know that when used outside [...]

Tags: , ,

Terminal Heroes 8: Memory usage scripts

Posted by Ktoso under coding, terminal heroes (No Respond)

I have a low-memory VPS running online and thus always have to worry about what uses how much memory… Of course top and my favorite htop are very good tools to check this, but sometimes I just want to get a super simple report if I’m overusing memory or not yet. The bellow scripts (most [...]

Tags: , , , , , , ,

(Almost) Automatically convert files into PDF

Posted by Ktoso under coding, freedom, fun, terminal heroes (No Respond)

I’m learning Numerical Analysis right now and a friend of mine found some really nice PS files by dr Marian Bubek ( http://www.icsr.agh.edu.pl/~mownit/mownit.html ). I was really happy to see some *.ps but some people from my fellow students started complaining that they’d rather have pdf’s and not ghostscript files (who knows why they’d do..?). [...]

Tags: , , , , , , , , , , , , , ,

Fixing Blender problems on IntelGMAX4500

Posted by Ktoso under coding, freedom, guide (No Respond)

I’ve recently bought a new laptop, a 15.6” HP Probook, that replaced my netbook Asus EEE 900 (needed some bigger hardware to work on “on the move”). One problem I encountered was blender not displaying correctly if I’d expand any dropdown menu etc. The fix is very simple yet powerfull, just set the following: LIBGL_ALWAYS_SOFTWARE=1 [...]

Tags: , , , , ,