One Month In Office
As I have already mentioned, I got a normal nearly full-time job recently. I work in a web hosting company (Russian) now. And I promised to write an artcile about how is it after a month of been employed. So, here st it.
I'm few days late, though.
It is hard to distinguish pros and cons right now as I'm all into this new job. It's new, it's interesting, it's (somewhat) challenging, it fits me perfectly. Hm.. Okay, let's state that was a pro.
On the other hand, it's in office. It means I have to be clothed (and I mean clothed, so robe and slippers ain't an option) to work, I have to move myself from home to office in the morning... That turned out pretty hard, I've never been and early-riser, so I didn't have enought sleep first two weeks and still I feel that if I could sleep more, I'd feel better.
I can't make coffee or tea in the office as I used to make them. Actually, there's no way to make fine coffee there (can't stand instant coffee), the tea I make there is acceptable, though.
It's harder to take a break in office, and you have to go through from morning to lunch and from lunch to evening. It's okay now, though, as I even forget about lunch sometimes (that will surely pass later). Opposed to this, it's easier to concentrate: home freedom gives you too many chanes that you'll reading blogs or playing Chromium rather than working. I was sick a couple days ago and had to stay home and tried to work from here as I used to do all those years. And what? Routine tasks took two times more than they usually take when I'm in the office. And I missed our issue traking system and lots of things I just got used to already. And most of all I missed the ability to turn my head and ask co-worker a question instead of emailing it.
BUT. I have weekends now. I can do anything (or nothing, which I prefer) after 6 AM. And I know what will I be doing next day. After three years of freelance it feels marvelous! I guess I'm getting fat-old-stability-loving-guy.
Also, I can learn now. First, new work means new challenges, and I have to improve some of my skills, which were pretty weak before. I never had time and need to get beyond just general understanding of perl, bash, sed and awk. I barely understood how MySQL replication actually works. I knew nothing about PAM, NSS and postfix.
And I can actually learn: read books and manuals on things I do not use in my work. Just because I've got free time now. Finally I'm reading Dive Into Python and I like this language and will try to build my next own project with Python.
I don't have to pay attention to my time management anymore. No need to explain anyone, why do I have to work when they want to see me. Less interference between work and my (yet inexistent, though) private life.
And the last thing for now, I guess, is pro office work again. I can get enough resources when I need. I cat ask for a test server, so I don't have to manage virtual machines and virtual network. I can ask for software, though I never needed it yet and I doubt that I'll be need of something non-free in future.
Uhm. The very last: I know now what is TGIF really about, and I don't like it very much actually.
You see, there are much more pros for me now. Actually, this job is a good balance between freelance and what is usually ment by office work.
Encoding Mail Subjects Properly When Sending Mail With PHP
It is one of the most common bugs in Russian web applications. Nowadays coders do not forget to add Content-type header to mail messages, but many of them forget (or don't know) that this header affects he messag body only. They think, if they specified proper encoding for body, mail client will use it for Subject, too.
Which is totally wrong, of course.
I am speaking about Russian developers, because I only receive mail in Russian and English, and English messages for obvious reasons do not suffer from this problem. I'm sure that other languages suffer as much as Russian do.
So, enough dull talk. What should proper mail Subject be? If encoded if consists of the parts separated by special characters:
=?{original text encoding}?{encoding method}?{encoded subject}?=
So, if you want, for example, to send mail in UTF-8, your message subject should be converted like that:
$subject='=?utf-8?B?'.base64_encode($subject).'?=';
Do not do other people's mistakes.
(Use their experience to make your own ones.)
Major Changes, or The Song Remains The Same
I've been saving this for one of those Fool's Days, but it actually came true. Remeber me complaining about not getting office job and been stuck to freelance?
Right! I got the job. The very same one that I didn't get in August. The guy they hired instead of me then didn't appear to meet the requirements, so they contacted me again. Oddly enough, I received another proposal at the same time. I even talked to the second company, took their test job, finished it and sent back (they didn't reply, however), but it was something about Windows, AutoCAD, Visual C++ and lots of other things I don't really want to mess around with. I've forgotten my umbrella at their office, by the way :-)
So, now for almost two weeks already I work in a local web hosting company. Our (wow, apparently, it feels pretty cool when you say say we talking about your company) website is completely in Russian, because we are targeting Russian customers only, though, with got one client from Greece, as far as I know. In fact, there are only two people busy with hosting here: we are a part of bigger company. I'll tell you more about the company later as there's just not too much to say right now.
I promise to summarize my impressons about working in company and freelancing when it will a month since I started working: at November, 19.
And I'm not going to quit freelance. I'll just freeze it for a while and get back to it later, in smaller amounts, of course.
As new job consumes significantly less time and there are more interesting and challenging work here, I hope I will post articles more frequently hereinafter. I'm still what I am – a web developer and Unix admin, so more work – more experience – more articles.
See you soon.
The Hell of Non-Self-Documenting Code
There were a lot of buzz about self-documenting code a while ago, and there will probably be much more. I'm not that big fan of it (neither am I a fan of anything but music), but it is really helpful sometimes.
Do you hate lack of documentation as much as I do?
Plenty of languages are more self-documenting than they seem to be. On the other side, the thing that seem self-documenting, aren't always like that.
Take php. Imagine there's a torrent tracker software written in php:
function announce($passkey, $info_hash) {
//plenty of code here
return bEncode($resp);
}
Pretty obvious, isn't it. Sure. But.
But what?
It is so obvious only if you use some framework to route HTTP requests to your classes and methods. It that case yes, any (awaited) GET parameter has a corresponding function argument, and you can easily see what is passed to /announce.
But what if the application is built like old-style: one atomic action – one file? I have to admit, that this style has it's advantages, among some weaknesses.
The worst thing about it is that you have to document it. If you don't – you forget what should be submitted to this particular script. Or, if you remember, a serial killer who reads your code, doesn't know what input does this piece of code wait for.
Use MVC frameworks if you are too lazy to write comments. Please!
GetAFreelancer Introduces MasterCard Debit Card Payments
I have never taken GetAFreelancer (GAF) too seriously. Most projects there are clone a site, data entry, register XXX gmail accounts, or just the projects that aren't interesting or too cheap for me.
Yesterday GAF did something that a) makes me treat them as a more serious company; and b) lets them attract more possible service providers and, consequently, buyers. The concurrency is good for a professional (I already have a draft of article about that, will post it sooner or later), so I guess, I'll pay more attention to jobs listed there.

But let's get back to the point of this blog post. GetAFreelancer announced that they partnered with Payoneer and will now provide pre-paid MaterCard debit cards for their payments. I couldn't find any commission charges mentioned on their site yet, though. Probably there'll be just regular payoneer commission on every withdrawal.
Anyway, that is great news. While RentACoder promises to start iKobo (another pre-paid debit cards system) payments for more than a year without any result, GAF intoduced this kind of payment. Probably that will finally make RAC move.
Illusion Of Overworking
I've actually written this article a couple day's ago, but due to changes in my blog engine I tried to make, it was lost (yeah, I'm a loser, I know it) and I didn't want to type it again at that moment. But finished all the work for today, read lots of everything and still sleepless, I decided to try to post it again. Wish me good luck! Well... at least some luck, please!
We love so much speaking of been overworked and underpaid.
I work so much and so well! I should have been paid more!
And, hell yes, we love speaking of our families who do not value your work.
I work so much to give them everything! Why don't they understand, I'm working now! Do they really need to bother me so many times a day? I do that for them, and they cry for attention!
Recognize yourself?
Are you really that busy? Yes, I know that myself. I am, too. Are you tired? Sure! Staring at your monitor all day round! Oh, our poor red eyes!
Are you tired of working? Are you sure? Are you really working? How do you spend the day?
Checking email every 10 minutes. Updating rss feeds four times an hour. Endlessly reading and commenting and writing and surfing and downloading and searching for something else to download. A lot of time. And your eyes! And your neck! And your spine!
Updating your software. Every single day. Every single piece of software you use and some pieces that you used only a couple times and even a few pieces you never ever used! Then googling and reading and commenting and reading again to solve problems appeared after upgrade. Your eyes. Your nerves. Your fingers!
Chatting with your good old friends online. Yeah, yeah, they're friends, you need them, they need you, you're having fun. You should be relaxing, why do you pretend you're working?
How much time do you really have for your actual work after all those things? That's why you work so much and get paid accordingly. That's why your family scream and should and want you to turn you face to them.
So please, guys, STOP fooling me and yourselves. Work, bastards! If you need more money, work more and better and for those who can pay more.
Work when you have to work. Do not pretend you're working when you're not. Kiss your wife or girlfriend. Don't miss your son's first step and your daughter's first wedding.
When have you seen your parents last time?