Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Perl

Journal Journal: I was barking up the wrong tree

Well now that the weekend has passed and I've had a full day to try my hand at getting CPAN.pm to correctly compile Text::Diff I have finally figured it out.

First I tried to download MinGW to give me Windows binaries of gcc and companions. That worked fine and now I have about all I need as compilers go. It didn't solve my problem at all because Text::Diff still didn't compile.

That's not exactly right. Text::Diff didn't even get the chance to compile. It was stuck back in MakeMaker.pm trying to build the project with no success. The line $(PM_TO_BLIB) in Makefile kept spitting up no matter what I did.

So after several hours of fiddling with it, I finally gave up and got myself a cup of coffee (304yen for a tall cup of coffee at Starbucks. Outrageous!). When I came back I surfed the web a little and came across this posting which jogged my memory a little.

PPM is the Perl Package Manager for Activestate Perl. It is a CPAN replacement as far as I can tell and it *just works* which is a hell of a lot more than I can say for CPAN.pm.

So in five minutes I got the modules installed and a test program running and all is right with the world.

Thanks to all who offered their help. It turns out I was wandering down the wrong Unix alleyway instead of in the brightly lit Windows main street.

Upgrades

Journal Journal: Why do Digital SLRs exist? 4

I've been doing a lot of thinking about cameras lately.

I wasn't ever a big camera freak until I came to Japan. It all began a few months after I got here. You see, my wife is a web developer who doesn't like being restricted to clip art catalogs, so for one of her projects we went out and splurged on a Fujifilm FinePix F601. It's a sweet little camera with recording up to 6 million pixels and a really nice zoom lens. It's quiet, small, and feature filled. It's also discontinued in the U.S., probably because it's too expensive and fills a niche that doesn't really exist.

Since getting that camera, the photo bug has bitten me. I spend way too much time at the camera store across the street from my office handling the various 35mm SLRs[1], consumer digital cameras, and professional dSLRs[2]. It's a lot of fun for an otaku like me, even if the wife doesn't understand my obsession.

Something has been bothering me about cameras, though. As I was playing with the Canon Ds which is arguably the best mobile digital camera on the market today[3] I began to wonder about dSLRs. The reason that SLRs exist is to fix the problem of parallax that plagues rangefinder cameras. Rangefinders are the 'normal' type of camera. They can be the cheap one time use throwaways or they can be several thousand dollar Leicas with interchangeable lenses. No matter the type or maker of rangefinder, though, they all suffer from parallax. Parallax is the difference in angle between what is seen through the eyepiece and what is seen through the lens and ultimately projected on the film. At large distances parallax is not an issue because the lines of sight eventually merge into one, but at very close distances the difference in angle can be very great. What you see through the viewfinder may not be visible through the lens.

SLRs were designed to fix this specific problem by showing through the eyepiece the same image that will be projected onto the film. The image you see looking through the viewfinder is actually coming through the lens system, not approximated like in the rangefinder camera models. This is achieved by placing a system of mirrors and prisms between the lens and the film which redirect the incoming light upwards, away from the film, and onto a screen in the viewfinder. When the photographer presses the shutter button, the mirror is flipped up blacking out the viewfinder for a moment [4] and letting the light coming through the lens hit the film. This flipping makes the well known "ka-chak" sound that is music to any photography otaku's ear.

Camera bodies have evolved around this mechanism and lenses have grown up with the evolving camera bodies. Nikon and Canon have vast selections of lenses available for their cameras both first party branded and third party branded. When making the switch from film photography to digital photography the cost of lens replacement is a real issue. Having bought into the Nikon or Canon lens system means that half of your decision of which digital camera to buy has already been made.

Camera manufacturers have been basing their dSLRs on SLR camera bodies. It makes sense because these bodies are already in production and can be tweaked in minor ways to support electronic imaging sensors instead of 35mm film, in addition photographers are already familiar with SLR bodies and are usually comfortable with them. So for very little effort, traditional camera makers can become digital camera makers with a ready-made audience dying to upgrade to digital.

But is the digital SLR necessary? The point of SLRs was to eliminate parallax by giving the photographer a true TTL[5] image in the viewfinder[6]. However, with current digital imaging technology it is possible to have a TTL display projected into the viewfinder electronically without any need for a mechanical system of mirrors and prisms. Many "prosumer" model cameras like the Fujifilm FinePix S602 eliminate the SLR mechanism and provide a TTL image by transmitting the image to an LCD display in the eyepiece.

Fuji and other manufacturers of similarly-equipped cameras have given the user an SLR experience without the worries of owning a real SLR. In the current state of the art it is still troublesome to see great detail in the LCD viewport, but such problems will likely work themselves out as LCD technology gets better[7]. The other big problem is that existing lenses are not compatible with these new high-end consumer cameras. Expensive modifications and fitting rings need to be attached before they can be useable with normal 35mm lenses, and even then there is no guarantee that things like autofocus will work and play well with the digicam. This seems to be a deliberate crippling of these models by the camera manufacturers to encourage professional photographers to pay a couple thousand dollars more for the 'professional' line of dSLRs.

So I wonder what the benefit to the consumer is of the dSLR camera body. It definitely offers the benefit of essentially unlimited photography in a familiar film SLR body, and it has the added benefit over 'pro-sumer' electronic TTL viewfinder cameras of a wider array of lenses and peripherals. However, neither of these are true benefits if the so-called pro-sumer cameras could be made to support existing lens systems.

It is my belief that at some point the reliance on mechanical imaging via mirrors and prisms is going to bite camera makers on the butt because some radical upstart is going to make dSLR-quality cameras without the SLR cruft and earn a large foothold in the digital camera market. Such a camera would be useful to the weekend photgrapher who wants an easy interchangeable lens system and to the professional photographer who can't afford to spend money and time waiting for the repair shop to fix the stuck mirror. Technology is the only limiting factor here with the LCD display, but betting against technological improvements is a losing bet.

[1] SLR - Single Lens Reflex cameras

[2] dSLR - Digital Single Lens Reflex cameras

[3] Kodak will likely take this title soon, and Sigma should have a serious contender with Foveon technology.

[4] Many digital cameras will black out the screen during a shot to simulate this SLR action.

[5] TTL - Through The Lens

[6] The cynic in me says that it was also to have more things to break and drive up profits from repairs and warranty sales.

[7] Foveon promises good things on the light-receiving components. Could this tech be turned around and used as a display component. This would increase resolution by 9 times per each square inch. Dibs on the patent!

GNU is Not Unix

Journal Journal: I got no chickens. I got no eggs. 4

Like the age old question, "How can I get a job without experience? And how can I get experience without a job?", I've run into another chicken and egg problem.

Let's start at the beginning.

I need to write a utility that we can use in-house that diffs our set of files with our customer's. Hey, I know Perl, I could probably whip up something pretty quickly and have it workable in a couple days. And, you know, there's CPAN which will make my job a whole lot easier with pre-made modules and whatnot.

So I hop over to CPAN and lo and behold there's exactly what I'm looking for.
*********
Text::Diff
*********
Yay!

So I load up CPAN.

>install Text::Diff

Can't do it. There's some code to be compiled and I don't have make. Apparently VC++'s nmake.exe isn't good enough.

Whatever, no problem. Just install good old Cygwin to fill all my Unix needs.

Cygwin's installed now, CPAN should be happy and I'll be on my way to a better life in the Bahamas when this program saves my company tons of time and money and my stock options come up for air.

Wrong again! Cygwin doesn't come with make. It doesn't come with gcc either. Being the smart programmer that I am, I know I'll need a compiler so I hop over to GNU's website and download the latest gcc tarball.

Slow down there, Cowboy. gcc requires you to have make installed. Well, I guess it makes sense...

Hop over to the GNU make page and get that tarball. I think I finally have a handle on this now...

Unfortunately, I don't have ld anywhere in my path. And fuck me if I don't have it on my computer anywhere.

When I finally do scrounge up the linker off some site on the web, it turns out I don't have the proper compilers to actually build make. Well, no shit Sherlock. That's what I was trying to build in the first place.

So I am stuck now with the sources to gcc and the sources to make and neither the twain shall build.

I guess my question is, "Why doesn't Cygwin package gcc and make in their install?"

But that's really secondary to my main problem which is that I need to get binaries for gcc, make, and eventually Text::Diff.

Any suggestions?

User Journal

Journal Journal: Subject not required? 1

How did this happen?

[Update]
Well, it's not happening anymore. Previously the lesbian monkey title was not there.

Anyway, nothing should surprise me around here, I guess.

Party on Garth.

User Journal

Journal Journal: Interesting spam 1

Hirsute beavers. Complete with pics.

At work, no less.

Not something I needed to see...

User Journal

Journal Journal: Story submission 2

I've got plenty of writeups to give this story, but my submissions never get accepted.

Anyone else want to submit it to the Slashdot crowd?

User Journal

Journal Journal: Editor comments gone?

So when did the editors stop writing their little quips at the end of each submission?

[Update] I take it back. Hemos has broken editor silence.

User Journal

Journal Journal: Fuck you IE, Fuck you Outlook 4

I had a pretty long JE nicely written, but it got wiped out with a single click in Outlook.

How about opening web links in a new browser instance, fucker?

How about caching the fucking contents of the page, IE?

FIL's computer breaks, none of the photos I took came out, I spill a little coffee in Yodobashi camera and get kicked out, and now IE deletes my JE.

What's next? Meteor to the head?

[Update] I guess I should make clear that I was typing directly into the 'Entry' text box and that text was erased. I received an email from a coworker that had a URL he wanted me to look at. Click. Page opens in existing IE window. JE gets deleted.

I really didn't expect the original JE to turn out so long, so I didn't write it in Notepad.

Stupid me.

Music

Journal Journal: Memories... All alone in the moonlight 2

Sometimes an old song just pops into your head and you can't get it out. Sometimes you only know a few lines, but for some reason you just can't get the rest to come together in your head.

Maybe if I write it down someone can help me fill in the blanks.

On a chicken farm
Just down the stream
From Oakridge, Tennessee,
A nuclear reactor
Leaked some water accidentally.

What happened next
Is like a horror story by Ralph Nader
That toxic waste leaked into
A brood house incubator.

Inside that chicken coop
They always kept the TV on.
Said, the programs helped the chicks to grow
Helped to keep them calm.

As four little chickens
Put that heavy water down their gullets,
The kung-fu show was on the air.
Something happened to those pullets.

They began to grow and grow
With that kung-fu show locked in their brain.
That's the only way we can explain...

Teenage mutant kung-fu chickens
(buk buk BWAK)
Big as a house, strong as the dickens
Anything they want's easy pickin's
For teenage mutant kung-fu chickens

One said his name was Fricasee,
The second: Cordon Bleu.
The third was Cacciatore.
And the fourth they just called Stu.

They could have been dangerous
Having grown so big on heavy water,
But they decided they would live their lives
On the side of law and order.

And I can't remember the rest. A little help?

User Journal

Journal Journal: More Peer Reviews 2

All names have been changed to protect the innocent.

Peer to be reviewed: K
Relationship to Peer: Co-QA Engineer

K's major lack is simple. He is not trained as a computer programmer and as such he cannot write code. This is a problem because it is almost a given that a QA engineer should be able to implement automated tests and add them to the existing harness framework. His current inability to do this detracts from his value as an employee at this company.

That said, I must stress how good of an engineer K is. His insightfulness and general brightness in regards to testing is unrivaled in my years as a software engineer. His ability to identify test points and come up with test ideas is so keen that after a short perusal of the spec and a conference, the test plan is essentially finished.

His personality is a great fit for this company. The home office prides itself in cultivating an employee-friendly atmosphere by hiring people who fit the mold and he definitely fits well. Unfortunately for him this is the Tokyo branch and there seems to be no effort put forth to cultivate such an atmosphere here.

His eagerness to take on responsibility is commendable. Realizing my weakness in Japanese skill, he has taken it upon himself to handle the written communication of the QA team. In addition, he has begun taking English lessons without subsidization from the company and has in a few short months become quite capable in speaking and reading the language.

In summary, K is an outstanding contributor to this QA team and a boon to the company. The company would do well to consider paying for some programming classes for him to maximize his abilities and to expand his usefulness to this company.

User Journal

Journal Journal: The hammer falls 2

6 people laid off today. I'm still here, but so are other people who really ought not be.

What a shame.

User Journal

Journal Journal: Peer review time! 2

Well, it's the end of the working year here in Japan and since reviews are not going to happen in earnest I will go ahead and give my peer reviews here. Names have been changed to protect the innocent, but if you know me personally, there's a good chance you know who I'm reviewing.

My Manager: C
C's contribution to this company cannot be understated.

He has managed to make himself indispensable, not by becoming a leader and empowering the workforce, but by hording knowledge such that no one can pinpoint exactly what he does. He generates copious amounts of paperwork and emails which have no importance to clients and do nothing but delay actual engineering efforts. As a QA Engineer, I find myself deluged with requests to generate all manner of reports which eventually get criticized due to their lack of content, content which does not exist because too much time was wasted generating documents that customers will never see and which have no bearing on anything other than giving the impression that QA is busy.

His managerial ability is nonexistent. His unwillingness and hostility to fielding questions from customers is but one aspect of this mismatch between his abilities and the job requirements. On numerous occasions he has yelled at clients over the phone, disregarded meeting appointments with clients, and has left numerous questions emailed by customers unanswered. To make matters worse, he displays hostility to engineers who recognize this failing and contact the customer directly.

He does not work and play well with others. His arrogant attitude is always on display and the office atmosphere suffers for it. He has twice to my recollection called an engineer 'stupid' and berated the engineering teams numerous times since I began here in March. Since becoming sole PM (after convincing management about the ineptness of the other PM) almost one-third of the engineering team has quit voluntarily as a result of his actions. In addition, he seems to have developed a personal dislike for me, refusing to converse directly with me about matters which pertain to projects that I am on. As a result, I seem to always be behind the curve as I hardly ever receive team meeting notices and must hear about topics discussed after the fact in too many cases. My work has suffered because of this childish behavior on his part.

He is unrealistic in his expectations. A tight schedule is not necessarily an unreasonable schedule. However, when a project runs 4 months overdue and there is no end in sight, it is safe to assume that the initial schedule was so far off the mark that it calls into question the scheduler's ability. During the 4 months that the project is past due, we have received zero revenue from those engineers, we have in essence burned through the original profit and have burned the same amount again. Had C given the customer a more realistic schedule, this company would be making money on this project instead of losing money.

The same goes for every project that I've seen pass through this company during my employment here. Not one has finished on time except for two which I personally took charge of and completed well within the schedule proffered to the customer at the outset. Several projects have had to be cancelled because of bad scheduling or because the customer became frustrated with the lack of quality customer support they received at C's hands.

C's facile eagerness to please the customer while they are in front of him is non-existent once they are out of sight. However, what is never out of sight is his reluctance or inability to provide a buffer between the customer and the engineering teams. Rather than work with the customer to revise project schedules and expectations, he blames the project slippage on the engineers whom he then turns the heat onto to produce faster which then turns into the well known problem of slipshod work becoming another hurdle. This was especially noticeable in the 4 month overdue project where the customer was so upset that they demanded that the team members go to the customer's site and work under the customer PM's nose for 3 weeks straight. Had C deflected that frustration towards revision of the development plan, the suffering (which was not compensated for in any way) of those engineers could have been avoided.

Also, his manner of conducting meetings is questionable. As PM, it is his responsibility to lead the meeting towards fruitful discussion, but instead he hides behind his notebook computer and sits silently while the customers sit silently waiting for him to begin the discussion. When he does speak, he takes every opportunity to discuss the minutia of the project down to the addressing of registers. This is simply not necessary and could be handled via email or "taken offline" (as they say at Microsoft).

In summary, I have to say that he is a very large liability to this company. When we hear from customers how hard it is to work with this company, there is a single point of failure and it is C. It cannot be stressed enough how detrimental it is to prolong his employment.

And for now, that's the only peer review I've got in me.

User Journal

Journal Journal: When usin a knife o cut bread, wach your fingers. 1

I will not be correcing this JE for spellin.

This morning while makin toast for my loely wife as she was gettingh ready for work, I sliced the tip of one of my fingers off.

Saw, saw, saw, Hello pound of flesh!

I yelled immediately and ran to the athroom wih the dismembered finger piece and washed off as much blood as I could. Then wih the help of my wife, I stuck the piece ack on as well as could be expeced and stuck a band-aid on i.

I uess my wrihing on the bathroom floor gae her the idea to take me to a hospital to hage them look at it.

Easy stiching, I guess, because I was done with that part in less than 10 minutes. Howefer, the strain had caused my blood pressure to drop considerably (64/30) and I just about passed out in the docto's office. Well, that was before I panicked and ran to the sink to throw up yesterday's dinner (we hadn' eaten breakfast yet).

So I got to lay down for a little while in the ER while those sexy Japanese nuses kept walking y the doorway. It would hae been better, no doubt, if my wife wasn't right next to me making sure I wasn't leering at them.

I went home, sponge-bathed myself, and am now at work. The finger is still pretty num from the anestheic, but I can defintely feel some pain coming back. As a programmer, poundinf on the keyboard is killing the finger.

Oh yeah, it's Christmas and the Japanese work on this day. Weirdos. But then again, I'm here too. At least I'm bitching about it.

Anyway, the question of the day is: Which inger did I lop off?

Bonus question: Am I right or left-handed?

And a Merry Christmas to you!

User Journal

Journal Journal: Do bald people get dandruff? 4

Why? Why not?

How about people who shave their head?

If they don't get dandruff while bald (I'm assuming they don't here), what is the threshold at which dandruff comes back?

Slashdot Top Deals

If a thing's worth doing, it is worth doing badly. -- G.K. Chesterton

Working...