Tuesday, July 3, 2007

I quit!

Finally I made my decision. I quit my current job to start a new one.
The current job didn't provide me with what I really needed. No raise since January, no development.. The bosses wanted me to make a shop as quick as possible. The normal timeframe should be 4 days and it took me a week to finish mine. Okay, so I guess this isn't the right job for me. I need to develop my skills, to write custom projects, to learn new stuff. I'm not a security guard who can't wait for the 8 hours to finish.
I'm a web developer.
Or probably a wanna-be. On 2 of the interviews I came up with the thought that I'm a complete newbie. I've never seen such queries and classes. However I have 2 offers so far and one of them suits me great. Almost double the salary and a well-balanced office, no short deadlines and I'm doing the projects from top to bottom. No matter what technology/ies I use, I decide. Sweet.

Thursday, June 14, 2007

Safari on windows

Apple launches safari for Windows
Oh great, now I have to test my scripts on ANOTHER browser.
I wonder when everyone, who knows something about C#, will write a browser with its own engine, and who doesn't care about standards and make each web developer's life miserable. Just to have his own 0.1% of the market share.

Tuesday, June 12, 2007

Albania welcomes Bush.

Albania welcomed George Bush when he came there pretty warm and friendly.
Maybe too friendly. Watch this video to see how they treat their guests :)







tip: 00:50 - 01:10

Monday, June 11, 2007

E-gold VS Paypal : The developer's view

When I first began using e-gold in small scripts, like bubble games, etc. I found it pretty easy to use. Now when I have to implement Paypal's Payflow Pro I find it pretty hard.
Why do I have to read 170+ pages of developer's guide + 24 pages express checkout and direct payment simulator guide in order to implement just this system? I really don't get it. Why should we make our lives THAT difficult?

Sunday, June 3, 2007

Passed the exam!

Yay! I passed the exam! It wasn't hard actually, I was lucky, because I was alone with the teacher, so we could speak about the problem.
We actually talked 10 minutes about the exam and 3-4 hours about other things that had nothing with it. He asked me what I'm working, and when he understood he said he needs a site. From what I heard he needs a wiki + a forum. That's easy. The job should assure the passing of the last exam.
So I guess I was pretty lucky :)
Now I have some time to concentrate on my job and on the article I'm writing about accounts in php.

Friday, June 1, 2007

Exam

I'm going to Blagoevgrad for an exam. It's one of the two exams left until I finish my bachelor's degree on Physics in the South-West University in the town. The exam is on "Differential equations" and it's left from the second year in the university. The other exam I have to pass is "Theoretical Physics part 4", led by the same teacher, M. Tassev.
Wish me luck :)
When I get back I'll test some more caching engines and will post here the step-by-step result.

Tuesday, May 29, 2007

Back to work...

I've been ill these days, so I wasn't able to go to work.
Fine now and the cycle starts again.. From home to work, from work to home...
For those of you that don't know what my job is - I'm a web developer at a us-based company here, in Bulgaria. Mostly I use php/mysql for my scripts, but when I want to try something new I'm always open-minded. That's how I fell in love with AJAX.

Apache and PHP optimization under linux systems

Here you can see an article on how to optimize apache and PHP if you're suffering a high cpu load.
I personally don't have the time to test it, but I'd be delighted if you share the results of this optimization.

Sunday, May 27, 2007

eAccelerator - does it really work?

This article made me take the decision to try out the eAccelerator on my forum. The forum is hosted on a second-hand server, entirely dedicated to it. I have met some difficulties with it recently, because the hard drive is kinda old and isn't as fit as I'd like. It makes server loads around 50-80 and up. I'll try to install the accelerator as I write this post.
My server has an Intel celeron CPU, running at 500 MHz, with 128 MB SDram and an 8.4 GB hard drive, running debian etch. Currently it takes around 0.5 seconds to load a page with 8-10 mysql queries. The script for the forum is simple machines running the latest version so far (1.1.2), I've chose it because it's lightweight and has comments written all over the code, so it's way much simpler to modify something, then it was in phpBB. So here's the test:
Following this tutorial (yes, I know, I'm a geek because I read linux tutorials)
Looking through google on how to untar .tar.bz2 archives.. found the command tar --bzip -xf filename.tar.bz2 and initially it didn't work. I thought of trying aptitude install bzip2 and it worked! Okay, untar-ed the file, continuing the tutorial...

debian:~/eaccelerator-0.9.5# export PHP_PREFIX="/usr"
debian:~/eaccelerator-0.9.5# $PHP_PREFIX/bin/phpize
-bash: /usr/bin/phpize: No such file or directory


yeah, such a tutorial...

debian:~/eaccelerator-0.9.5# ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
-bash: ./configure: No such file or directory


WTF?!?
Trying this:
http://tag.csdn.net/Article/86766964-179d-4d99-8d93-d85db3645a80.html
Didn't work.
What kind of a package WON'T RUN ON DEBIAN?!?
Giving up. Will try another caching engine.

Saturday, May 26, 2007

WebTech 2007

The 4th Internet technologies conference will take place from June 29 till 30th in the Bulgarian seaside at city of Varna where you can combine sun, sea and technologies.

The conference as in the previous 3 years will focus on new technologies in web programming, open source and everything that stands for IT.

The conference is free of charge.

Great news! And the fact that I'm living in Bulgaria means that I can go there.
Unfortunately they chose Varna, which is around 500 kilometers away from the capital, Sofia, where I live. Maybe I should speak with my boss if he wants to pay the travel expenses. That's in his interest too after all...

Some advices about using php.

If you're a newbie and are looking to buy a book remember this:

  • Always look for the NEWEST edition! This is a must. When I started reading it was from a PHP 4 book where they used global variables. I mean $bla instead of $_POST['bla']. Since php 4.2(?) register_globals has been turned OFF by default, because it's a major security threat.Some of the guys I work with in the same company use global variables to write their code. I can't tell you what headache it is when I have to edit one's code until I find out where is the definition of each variable.
  • Use <?php instead of <?. Use <?php echo $variable; ?> instead of <?=$variable?>. Yes, I know it's shorter, but short_tags has been turned off by default since PHP 5.
  • If you are working with a lot of people always write comments here and there. Remember that one day you may edit one's code and it would be much better if he/she wrote a lot of comments.
  • The other thing I already mentioned above was about the global variables. Always use $_POST['var'], $_GET['var'], $_COOKIE['var'], etc... instead of $var. Global variables are way unsecure. Check out this example:
<?php
// define $authorized = true only if user is authenticated
if (authenticated_user()) {
$authorized = true;
}

// Because we didn't first initialize $authorized as false, this might be
// defined through register_globals, like from GET auth.php?authorized=1
// So, anyone can be seen as authenticated!
if ($authorized) {
include
"/highly/sensitive/data.php";
}
?>
See what I mean?

Eight reasons NOT to use mysql? Come on!

I've just read this article:
http://www.cio.com/article/113111/Eight_Sound_Reasons_Not_to_Use_MySQL
Yes, I admit, I didn't read the whole of it.
However this is my opinion about it. I saw it in the news bar on the right side of my blog. There I usually find news. This was on slashdot, which referred to the above site. Slashdot usually writes news, not opinions, right? The news are supposed to be NEWS, NOT OPINIONS. True, but not in this case.
Okay, maybe a C# developer, living in North Dacota doesn't like mysql, because he can afford or should use mssql for his project(s). Does that mean
I'm a web developer, mainly using php with combination of mysql for storing data. I haven't seen anything better than mysql, so I use it. And it is free. So tell me why should I listen to someone telling me to buy something, just because he thinks it is better.
Software is like sex - it's better when it's free!

Thursday, May 24, 2007

A first post, kinda introduction

Hello there.
This is a new blog, mostly php oriented. I'm gonna try to keep you updated about the new php goodies, and such things.

Also my aim is to post here some php/mysql tutorials, which you may find helpful.
Hope you enjoy your stay :)