Wednesday, September 5, 2012

Terminal Style for Calibre

I am no frontend designer, but this works for me. Resembles a terminal, a lot easier on my eyes. :)

I like calibre. Cheers!

body {color:rgb(50,999,50) !important; background-color:rgb(0,0,0) !important; text-align:justify !important; margin-top:0px; margin-bottom:4px; margin-left:50px; margin-right:50px; text-indent:3em !important;} h1, h2, h3, h4, h5, h6 {color: red !important; text-align:center !important; font-style:italic !important; font-weight:bold !important;}

Wednesday, August 22, 2012

Don't Forget, Bugs Can Be Environment-specific Too

Fun With Play Framework

I recently heard a lot of great stuff about the Play Framework so I decided to download it and play with it. The tutorial seemed rather simple, I figured I would just breeze through it. Nope. Not at all.

Running play on its own worked normally as it should; creating a new application via play new worked as it should. Running play in the app directory is where it failed.

error: error while loading , error in opening zip file [error] scala.tools.nsc.MissingRequirementError: object scala not found. [error] Use 'last' for the full log. Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

Interesting. I dug deeper and thought it was due to Play's bundled version of sbt. So, I installed a version of sbt. I tried a "hello world" test with it and got the same error. Aha! So it must be a bug with sbt. No, not really. I google'd and stumbled upon Howard Guo's blog and read that he too was running openSUSE. Ah, now that's where it all hit me! I loaded Play on my old Ubuntu box and bingo all is well! Sheesh.

The Bugzilla entry says this bug probably won't be fixed since it's in openjdk 1.6.0, but luckily the fix is easy enough!
That's quite unfortunate - please type
chmod 0644
/usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/lib/ext/gnome-java-bridge.jar
as a root as a workaround. I doubt we will release any new maintenance update
of openjdk6 in the future.

Friday, July 6, 2012

PHP: The Language You Love And Hate

tl;dr

I use PHP and find that it works well for most jobs, but for others, not that great. Use the language that best fits the job!

PHP in the critic spotlight lately

Quite a few "PHP is good" and "PHP is bad" posts lately; even from people who, like me, use PHP, love it, and also hate it, have come out to say a thing or two

Well, if you read veekun's post, he's got something going there that I really want to point out, even though it really wasn't meant for the way I'm thinking about it; it's the toolbox. As engineers, it is our responsibility to build things. You can hammer in a nail with a wrench (haven't we all done that once before?), but obviously you should have used a hammer. Heck, you can even use a nail gun if it does the job better.

Languages Are Engineers' Tools In Their Toolbox

No, really. The more you know, the more knowledgeable and versatile you will be. And obviously if you have that knowledge, you'll know what "tool" is the right one. Steve Yegge's post on interview phone screens tells a wonderful tale of this. 
"Many C/C++/Java candidates, even some with 10+ years of experience, would happily spend a week writing a 2,500-line program to do something you could do in 30 seconds with a simple Unix command."
I'll let you read the article for the complete story, but it essentially explains that you can do a search and replace in many ways, but if you don't know how to use grep or python or even php you would be wasting lots of time on a quick job.

Now, I'm not saying to go and learn all the languages out there. I'm just saying that maybe knowing a little bit of a compiled language, scripting language, and a frontend language would help you understand better the full stack of whatever you are working on.

Wednesday, April 18, 2012

FezBook Update: Added a Java Library

FezBook Java Library

I shouldn't need to say anything more than the title right? Well anyhow, my little FezBook Library that I've been using is also now available in java. Exciting! You can check it out on my github FezBook repository.

Why?

Well, why not? Hehe :) Honestly, I've been working on a backend service and java seemed like a nice fit. I haven't had the chance to drop a javadoc anywhere, so be patient. I may just end up adding the phpdocs and javadocs in the repository itself.

ymmv

Well, just try it and see. Same thing with the PHP version, you'll need to do your own OAuth or already have your access token. Enjoy!

Wednesday, February 29, 2012

Grepping for Control Characters

"\t Will Not Work"

Plain and simple, send a ^v before the control character you want. ;)

What happened there?

Say for example you want to grep for lines in a file that have tabs. You've tried grep '\t' yourfile to all avail and it's just not working. Well, you're close, you actually want to send a tab. To do so, use ^v (control + v) and then send an actual tab:
grep '^v[tab button]' yourfile

This seems to be a common question from people and a coworker just dropped in to ask, so here ya go! Cheers!