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:
manifest,
marshalling,
scala,
tips,
tricks
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:
java,
jdk7,
lang,
oop,
release,
tips,
tricks
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:
bash,
branch,
git,
prompt,
ps1,
shell,
terminal heroes,
tips,
tricks
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:
#maven,
build,
free software,
freedom,
git,
java,
opensource,
plugin,
release,
tips,
tricks
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:
codnig,
google,
java,
jee,
libs,
TDD,
tricks
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:
git,
terminal heroes,
tips,
tricks
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:
java,
tips,
tricks
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:
bash,
centos,
coding,
gnu,
gnu/linux,
shell,
terminal,
tricks
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:
coding,
cool,
freedom,
gnu,
gnu/linux,
hack,
hacking,
linux,
open source,
shell,
terminal,
tip,
trick,
tricks,
wget
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:
blender,
coding,
gnu/linux,
linux,
terminal,
tricks