Video of the Week: It’s Only the Beginning
It’s only the beginning, lots more tech fun in the future:
It’s only the beginning, lots more tech fun in the future:
Photo by dd21207
This has caused me some grief over the past few weeks, so here’s some tips on calling bash scripts from java correctly.
Use ProcessBuilder. Please.
Make sure you set the redirectErrorStream
to true, or make other provisions for handling stderr.
I’ve found that inheritIO
is useful. Not calling this caused a failure in a bash script that called other java programs.
Make sure your shell scripts have are executable, or that you call them with ‘bash scriptname’. Tarballs preserve permissions, zipfiles do not.
Read the output of the shell script, even if you do nothing with it (but you probably want to log it, if nothing else). If you don’t, buffers fill up and the process will hang:
final InputStreamReader isr = new InputStreamReader(p.getInputStream());
final BufferedReader br = new BufferedReader(isr);
String line = null;
StringBuffer sb = new StringBuffer();
while ((line = br.readLine()) != null) {
sb.append(line).append("\n");
}
Check your exit values, and wait for your shell script to finish: (If looking for speed, or more complex process flow, write it in java.)
int exitValue = p.waitFor();
if (exitValue != 0) {
// error log
}
Photo by JimsFlicker
If you are a software engineer or developer right now, you are in demand. There’s a dearth of software developers, and so you are probably getting calls from recruiters. This is location dependent–my understanding is that the SF market is white hot, and the market for software developers in Yuma CO is softer.
When I first was approached by a recruiter, I was flattered. Here was a stranger trying to find me a job. Quickly I realized that recruiters were not working for me (they get paid to place a candidate, so they are working for the company) and that most recruiters didn’t have a technical background at all. This made me feel less charitable toward recruiters, and I have found that common amongst developers, especially now that they have so many job options.
Older and wiser, now I have a more balanced approach. Here’s my tips for dealing with tech recruiters:
Reviewing my list, I boil it down to:
Any tips you have on engaging with recruiters?
Think about decisions from all perspectives…
Bill Gurley writes at Above The Crowd. He doesn’t write often–7 posts in 2014–and often they are simply “Welcome XXX to the Benchmark Capital family”. (He is a GP at Benchmark, a VC fund.)
But when he dives in and covers a topic, it’s very informative. Some of the meaty topics he covers:
The rarity with which he posts make him a perfect addition to an RSS reader–you probably won’t visit his site regularly, but when he does post, you’ll want to know.
I don’t see any evidence of him writing on Medium, but he does tweet. (Incidentally, his twitversation score is 52.)
Enjoy