Showing posts with label work. Show all posts
Showing posts with label work. Show all posts

19 August, 2008

Getting Sun's JDK working right in Fedora

This should be an easy task, right? Just download the RPM, install it, done and done. Right? Well, no, not quite.

I've managed to whip up a couple commands that help with the post-install though. Namely, overriding all of the various symlinks throughout the system to IcedTea and GCJ. Here, for your viewing and usage pleasure, is what I have come up with. Please feel free to emend where you deem appropriate, and please let me know if I am missing things!

alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_07/bin/java 20000 --slave /usr/bin/keytool keytool /usr/java/jdk1.6.0_07/bin/keytool --slave /usr/bin/orbd orbd /usr/java/jdk1.6.0_07/bin/orbd --slave /usr/bin/pack200 pack200 /usr/java/jdk1.6.0_07/bin/pack200 --slave /usr/bin/policytool policytool /usr/java/jdk1.6.0_07/bin/policytool --slave /usr/bin/rmid rmid /usr/java/jdk1.6.0_07/bin/rmid --slave /usr/bin/rmiregistry rmiregistry /usr/java/jdk1.6.0_07/bin/rmiregistry --slave /usr/bin/servertool servertool /usr/java/jdk1.6.0_07/bin/servertool --slave /usr/bin/tnameserv tnameserv /usr/java/jdk1.6.0_07/bin/tnameserv --slave /usr/bin/unpack200 unpack200 /usr/java/jdk1.6.0_07/bin/unpack200 --slave /usr/lib/jvm/jre jre /usr/java/jdk1.6.0_07/jre

alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_07/bin/javac 20000 --slave /usr/bin/appletviewer appletviewer /usr/java/jdk1.6.0_07/bin/appletviewer --slave /usr/bin/apt apt /usr/java/jdk1.6.0_07/bin/apt --slave /usr/bin/extcheck extcheck /usr/java/jdk1.6.0_07/bin/extcheck --slave /usr/bin/jar jar /usr/java/jdk1.6.0_07/bin/jar --slave /usr/bin/jarsigner jarsigner /usr/java/jdk1.6.0_07/bin/jarsigner --slave /usr/bin/javadoc javadoc /usr/java/jdk1.6.0_07/bin/javadoc --slave /usr/bin/javah javah /usr/java/jdk1.6.0_07/bin/javah --slave /usr/bin/javap javap /usr/java/jdk1.6.0_07/bin/javap --slave /usr/bin/jconsole jconsole /usr/java/jdk1.6.0_07/bin/jconsole --slave /usr/bin/jdb jdb /usr/java/jdk1.6.0_07/bin/jdb --slave /usr/bin/jhat jhat /usr/java/jdk1.6.0_07/bin/jhat --slave /usr/bin/jinfo jinfo /usr/java/jdk1.6.0_07/bin/jinfo --slave /usr/bin/jmap jmap /usr/java/jdk1.6.0_07/bin/jmap --slave /usr/bin/jps jps /usr/java/jdk1.6.0_07/bin/jps --slave /usr/bin/jrunscript jrunscript /usr/java/jdk1.6.0_07/bin/jrunscript --slave /usr/bin/jsadebugd jsadebugd /usr/java/jdk1.6.0_07/bin/jsadebugd --slave /usr/bin/jstack jstack /usr/java/jdk1.6.0_07/bin/jstack --slave /usr/bin/jstat jstat /usr/java/jdk1.6.0_07/bin/jstat --slave /usr/bin/jstatd jstatd /usr/java/jdk1.6.0_07/bin/jstatd --slave /usr/bin/native2ascii native2ascii /usr/java/jdk1.6.0_07/bin/native2ascii --slave /usr/bin/rmic rmic /usr/java/jdk1.6.0_07/bin/rmic --slave /usr/bin/schemagen schemagen /usr/java/jdk1.6.0_07/bin/schemagen --slave /usr/bin/serialver serialver /usr/java/jdk1.6.0_07/bin/serialver --slave /usr/bin/wsgen wsgen /usr/java/jdk1.6.0_07/bin/wsgen --slave /usr/bin/wsimport wsimport /usr/java/jdk1.6.0_07/bin/wsimport --slave /usr/bin/xjc xjc /usr/java/jdk1.6.0_07/bin/xjc --slave /usr/lib/jvm/java java_sdk /usr/java/jdk1.6.0_07
You may notice that I did not include the manpages in these alternatives definitions. This was intentional... because alternatives is looking for gzips and the JDK, by default, does not gzip them. Whatever. I leave that as an exercise for the user. I just didn't feel like bothering, myself. :)

14 November, 2007

All Your Data Are Belong To Us!

I just had a rather interesting article pointed out to me, on Computerworld UK. According to David Litchfield, a UK based security researcher,
"There are approximately 368,000 Microsoft SQl Servers... and about 124,000 Oracle database servers directly accessible on the Internet,"
Given these numbers, I have to wonder what would be found if he were also to look for other widely used databases; MySQL, PostgreSQL, Firebird, etc. It's a bit of a frightening prospect to think that I probably have personal information stored on at least one, if not more, of those exposed servers. Things like this make me wonder how so many IT professionals keep their jobs when they really have no clue as to what is really going on. The most likely scenario is that these people are all book trained, they have their degrees and certificates and all that nonsense... then they get into a real world environment, thrown up against a huge ball of servers, and they have no idea what to do. Hearing about these things makes me very glad for the opportunities and experience that I have had. I learned better, LONG ago, than to make amateurish mistakes like this.

You can view the full text of the article here: http://www.computerworlduk.com/management/security/data-control/news/index.cfm?newsid=6198

28 August, 2007

Geeky happiness

Okay so uh, I just have to let out a little explosion of happiness. I'm finally getting my boss to order servers on par with what I think they should be... and we just ordered what is, by far, the beefiest machine we've got. I think it may actually be pretty much the beefiest I've worked directly with. This thing has got 2 quad core Intel Xeon CPUs, each with dual 4mb cache... it's got 8gb of RAM... and the hard drive is SAS; Serial Attached SCSI. Basically, this thing flies. It makes me all kinds of giddy.

Okay, that's really all I needed to say.

Happy! Eeeee!

Now off to have some fun tonight before my surgery in the morning.
Catch ya'll on the flip side!

17 August, 2007

Management frustration

Okay so it's been a while since I've posted on here. Today, however, I have to rant.

Now it's not that I have anything against Indians (dot, not feather -- thank you Simrin) but I have to say that I absolutely hate hate HATE the offshore IT industry! It all started with tech support. You call up some large computer company, only to find that you are not talking to a native English speaker... you are speaking with somebody who very likely learned English just for this job, and has a vocabulary limited to the subject matter at hand. I'm not saying that I'm some linguistic genius. "I speak two languages: English, and bad English." But when I'm calling an American owned company, as a native English speaking American, I expect to speak to another native English speaking American so that we can both fully understand what the other is saying, without having to slow down our speech, repeat ourselves, and watch carefully not to use any colloquialisms which the other person wouldn't understand simply because of their cultural background.

So we started with the offshore tech support.... but wait, it gets better! Now we've moved to offshore programmers. Don't get me wrong, I'm sure this is an alright idea for some companies. They have no IT staff, they need something done and need it cheap. This solution will accomplish those goals. Now take an instance like the company I work for. We do have an IT staff ... well, if you count myself and a part-time sysadmin. Anyhow, we do have a staff. I do all of the programming, tech support, assist with sysadmin work (our sysadmin is an intern... so I'm tutoring him part of the time) and, well, whatever else needs to be done. However, we also have an offshore programmer working on one of our projects. He appears to be a very competent programmer from what I've seen, don't get me wrong. He's also fairly good with English. I don't believe we have had too much trouble with communication; a few small cases where the English language simply failed to explain itself. There are some major frustrations, however. There are days I really wish I had somebody sitting here in front of me, so that I could directly guide then on this project. I could also beat their head in, if necessary. In fact, I could throttle them, slap them around, throw things at them and tell them "NO NO NO STUPID! THIS is how it needs to be done! L-I-S-T-E-N to me.... do you understand the words that are coming out of my mouth!?" That's the joy of having somebody working directly beside you. Or at least, in the same general area.

See, what got me all riled up this morning is an email I got from this offshore programmer of ours. He's working on a project that's going to involve some audio and video processing. This is obviously not a simple process. In fact, in a previous post, I discussed just how easy this isn't. I also talked about how intensive a process it is on a system. So right now, this offshore developer is actually working on building this part of the system. This is a rather important part of the system... despite the fact that there will not be a heavy load imposed from video and audio processing; i.e., we aren't going to have people uploading constantly like YouTube. There will be at most 50 videos uploaded per day. Still, we have currently 3 web servers, and these servers are not very powerful machines. They deliver web pages; they don't need to be anything special. With this in mind, we definitely don't want to be doing the video processing on these servers. Our encoding time -> video time ratio would be through the roof. If somebody uploaded a 3 minute video, it could take upwards of 5 minutes to encode. This would tie up the web server for 5 minutes, starve it of RAM, kill its swap space, send the server into a processing frenzy. All the while, this server still needs to be able to deliver other web pages. Remember, only 3 web servers... and we're serving thousands upon thousands of web page requests per day... and with this new project, that number will potentially increase exponentially. This is simply NOT an acceptable situation. Keeping this in mind, I sent our developer some specifications saying that video and audio files are to be processed on a separate server. I won't go into exact details here... but I imagine it's actually an extremely scaled down version of how sites like YouTube actually work. Offload the work, keep the web servers freed up, continue serving web pages effortlessly, and get the media processed on a nice beefy server. Sounds great, right? Well apparently our developer and his "technical team" do not agree on this. I got an email this morning which said the following:
50 / day is not a big number to think of a separate server. So we can do this on the Web Server itself, instead of a new one.
Wait wait wait..... what? Did you not listen to what I was saying? (See my previous examples of screaming in this post to see how I would have liked to react to this ridiculous statement.)

Well, needless to say, my Friday morning buzz of happiness is now 6 feet under. In fact, more like 10 feet under. That sent me into a bit of a rage... and I still have to reply to this email.... the worst part is, I have to be polite! This is also taking me COMPLETELY off track from the project I've been working on, which is a very very bad thing.

So not happy right now.

Oh and to those who were wondering, yes I'm still alive. I just keep forgetting to post here. Thanks for the reminder!

07 May, 2007

Job Hunters

Right now, I am trying so hard not to laugh that my eyes are watering. I'm having trouble breathing, and I'm getting light headed.

What's so funny, you might ask?

I'm reading resumes. I am hunting for potential candidates for a job opening in the company I work for. We're trying to find a qualified systems administrator to take a chunk of my work load and get all our systems running the way I want them to be. Simple enough. There should be plenty of those people out there.

Wrong. WRONG.

After doing my initial filter and having to discount most of the resumes immediately because they're from out of state... I start to dig a little bit more. A lot more of them are thrown out pretty quickly because all I see are jumbles of letters starting with MS. Yay Microsoft certifications. TRASH! So far, I think I've had 3 people who got past these filters... one of them was actually fairly impressive, but works with technology that's on a scale I only wish we could afford here. The other two, however, are the ones who have me laughing so hard.

The first little gem I found was somebody who had been working for several years in the US Navy as an "Information systems technician"... alright, he's got my attention there. I'll bite. Looks like he's out of the Navy now... should be holding a fairly decent job but... wait, this says he's a "Cement finisher" now. Hmmm. He's a cement finisher, and he's asking for a $75k salary. BZZZZT! NEXT!

I found that previous one pretty amusing... but the one that's causing my asphyxiation is even better, at least to me. The headline on this resume reads "Information Systems Operator/Analysist". Even better, in his work experience, he lists "2006-2007 U.S. Army Signal Core - Information System Operator/Analysist". Will somebody, anybody, PLEASE tell me what in the world an "analysist" does!? I love it when people make up words... especially on a document as important as their resume!

Also, notice a common theme with these two applicants? That's right, they're both fresh out of our United States armed forces! I thought they were supposed to be able to get good careers (or at least be able to spell...) when they got out of the military. Things ain't looking so good for Uncle Sam...

23 April, 2007

I hate customers.

Okay so I like their money... but I hate dealing with customers. Every single one is so self-important and certain that they're the center of the universe, that they can't stop for one moment to realize that you're just trying to do your job and keep things running smoothly, just like they are. I really wish I didn't have to deal with customers; it's not even in my job description. IT people aren't suppose to interact with end users, it's just not how it's done. That's like telling Rainman to teach a math class. It's just not a good idea!

I think this is proof that I should never work in a job of any form where I need to deal with the public.

30 March, 2007

Encoding Flash Videos

One of our clients recently sent us a video that they want to have displayed on their website... and we've decided that the best option would be to use an FLV (Flash Video) file. We're also going to be using the same video format for an upcoming site of our own... one small part of the site will have uploaded videos, so they will need to be automagically converted to FLV. This sounds simple enough, right? Sure, it should be.

Turns out it's not all that simple.

After lots of trial and error, I came up with this command:
mencoder -vf scale=216:144,hqdn3d -af resample=44100:0:2 -hr-edl-seek -ovc lavc -lavcopts vcodec=flv:vqmin=3:v4mv:vmax_b_frames=0:vme=4:vqblur=0.0:tcplx_mask=0.2:mbcmp=6:trell:cbp:naq:dia=2:aic -oac mp3lame -lameopts vbr=2:q=5:aq=0:vol=2:mode=1 -ofps 10 -of lavf -lavfopts format=flv:i_certify_that_my_video_stream_does_not_use_b_frames dvd:// -o test.flv

Finally, I got a decent quality encode, with a decent file size, and not too ridiculous of an encode time... about 45 seconds encoding time for 1 minute of video. This was, however, on an already-busy 1.6GHz Pentium Mobile with 1gb RAM.

Now all I need to do is find another switch or perhaps another command to detect the video resolution and automatically maintain the proper aspect ratio when downscaling it... with that command, I scaled 720x480 down to 216x144 (0.3 times the size), but I had to pull out a calculator and figure out those numbers by myself... that doesn't work with an automated process. Oh well, one step closer at least!

Hell, I could make my own YouTube or Google Videos equivalent with this.... nice!

UPDATE:
Okay so, a couple frustrating hours later, I've finally got this down pat. I was getting some very nasty distortion on parts of the video... turns out that was due to the "tcpl_mask" option... according to the mencoder manpage:
Temporal complexity masking (default: 0.0 (disabled)). Imagine a scene with a bird flying across the whole scene; tcplx_mask will raise the quantizers of the bird’s macroblocks (thus decreasing their quality), as the human eye usually does not have time to see all the bird’s details. Be warned that if the masked object stops (e.g. the bird lands) it is likely to look horrible for a short period of time, until the encoder figures out that the object is not moving and needs refined blocks. The saved bits will be spent on other parts of the video, which may increase subjective quality, provided that tcplx_mask is carefully chosen.
In theory, it sounds like a great option. It could potentially add a lot of compression.... in reality, it barely effected the file size at all, and it cause all kinds of headaches. Along the way to finding this, however, I did find some other useful video filters, and I learned a bit more about encoding videos. (I thought for some time that it was possibly interlacing or interleaving that was causing the problems... so I ended up reading up on them, learning exactly how they work and what they do... only to realize there was no way they were guilty). I also managed to find that magic switch to automagically scale the video. I just have to specify one dimension now and it figures out the matching dimension... I love it! So, finally, here is the fully functional, heavily optimized version of that command:

mencoder -vf pp=h1/v1/dr,scale=216:-3,harddup -af resample=44100:0:2 -hr-edl-seek -ovc lavc -lavcopts vcodec=flv:vqmin=3:v4mv:vmax_b_frames=0:vme=4:vqblur=0.0:mbcmp=6:trell:cbp:naq:dia=2:aic -oac mp3lame -lameopts vbr=2:q=5:aq=0:vol=2:mode=1 -ofps 10 -of lavf -lavfopts format=flv:i_certify_that_my_video_stream_does_not_use_b_frames dvd:// -o test.flv

Yay! My work is done here.

03 January, 2007

Shocking!

I guess complaining can sometimes do some good, after all! This just appeared in our office:

02 January, 2007

Last straw

I just got asked to make a basic mundane tech support call. The kind of thing that would be handled by level 1 support, if we had such things. These are things that used to be handled by our admin, who is no longer with the company. This makes me a not happy boy.

Update: sigh. I think I was talking to a level 1 support monkey. He had no idea what he was talking about.

28 December, 2006

Moral dilemmas

These are the most difficult decisions to face in your life, but also probably the most important. Perhaps the situation they relate to isn't all that important, but the choices you make set a precedent for future choices. If you make a choice now that hangs on your conscience, it will make it much easier to do the next time. If, however, you make a choice to keep your conscience clear, it can also make these choices easier. The difference here, I suppose, is how you wish to lead your life. It may not seem like it with the individual choices you make, but they do add up over time. The accumulation of these choices is what ends up being known as a person, you. Each individual choice helps to mold that person.

I'm facing one such dilemma currently. On one hand, I can clear my conscience and provide a bit of a warning and openness to a friend... but at the same time, risk trouble for myself at work. On the other hand, I can keep my mouth shut, have that blemish on my conscience, and risk losing the trust of my friend. As cold as it may sound, friends come and go. But at the same time, so do jobs. The question is which one I would rather risk, and which has less chance of failing. The more important question, however, is whether I want that blemish on my conscience.

12 December, 2006

Code Restructuring

Recently it was decided that I need to go into a documentation/maintenance phase at work, which I'm totally cool with. There was next to no documentation for me to work with when I came into this position, and I've had to figure everything out from the ground up. Some things I'm still not fully sure of... but that's what this period of time is for.

I've decided to take this to the next level though. Notice I said "documentation/maintenance", not just documentation. I'm taking the opportunity to rewrite and refactor a lot of the core functionality of our code. Build it the way it should have been done to begin with. Reorganize things, make things more readable and understandable, and document the whole process as I go, of course.

This is really turning into quite the project... one of those ones where I'm not really sure how it's ever going to end. Right now, I'm working on rewriting all of our database connection code... which is a large undertaking in itself. I think overall, this is going to be a very worthy project though. I'm building a more solid base for our code to run on, trimming a lot of fat in the code, getting it all figured out for myself and any future developers... plus I'm increasing my own understanding of PHP's object oriented programming, and in fact object oriented programming in general. This whole thing will definitely be good for my resume and my future experiences in programming.

I just hope I can actually give this project a finite timeline...

30 November, 2006

I see stupid people....

And they make me want to cry.
I've probably spent as much time at this job fixing and covering for stupid stupid stupid things that were done before I was here, as I have spent on new development.

Then, there's the users .... don't even get me started.

20 November, 2006

Management

So I posted here previously that I will soon have somebody working under me, and the stress and doubts associated with that. I think I can safely say that I'm over those fears. I'm certain that I will be a strong leader and also a good teacher. I have no doubts there anymore. The problem is, now I'm doubting if I want to be in that type of position. It may be that I was born to be in a leadership role of sorts... I have always somewhat fallen into that role in most situations in my life. I'm just not sure if I want that to be my job. I like obscurity... I like being the man behind the curtain, making things work from the shadows. I like having the freedom to actually work, without constraints, without distractions. Most of all though, I hate dealing with political bullshit. And to me, that's what comes with a management role. You have to deal with customers and other managers all the time, and you have to play political footsie with them. That's not something I enjoy, that's not something I want. Sure, I can bullshit with the best of em when I have to, but I couldn't live with myself if that's what I did for a job. I would start to hate my job, and I just got myself out of a position where I couldn't stand waking up in the morning, because it meant I had to drag myself in for another day of worthless time at my job.

Then again, who knows, maybe it won't be that way at all. I may be over analyzing. Being in a management position here might be just what I need. I suppose only time will tell.