WordPress and PHP. Sessions and cookies.

This is more of a reminder to myself, than anything else.

  • WordPress does not use sessions as of now. They do everything via cookies.
  • Before using $_SESSION variable in PHP, one should have session_start() done. Read more about PHP sessions. In WordPress, the best place to have this is at the top of the header.php.
  • Another page load is needed after setcookie() call to be able to use the $_COOKIE variable. Read more about PHP cookies.

That’s all for now. Hopefully, I’ll spend less time bumping my head over this next time.

Linux kernel contributors

Linux Weekly News did an excellent job (as usual) with statistics over the recent release of Linux Kernel.

The end result of all this is that a number of the widely-expressed opinions about kernel development turn out to be true. There really are thousands of developers – at least, almost 2,000 who put in at least one patch over the course of the last year. Linus Torvalds is directly responsible for a very small portion of the code which makes it into the kernel. Contemporary kernel development is spread out among a broad group of people, most of whom are paid for the work they do. Overall, the picture is of a broad-based and well-supported development community.

Check the article – “Who wrote 2.6.20?” – for the statistical data, tables, and more commentary. There is also a hint to why I’ve been Red Hat supporter all these years.

Some more about technology

This thought has been so caught so many times in my head that by now I’m not even sure if I posted about it or not. But just in case I didn’t, here it goes…

The technological progress is enters our lives from many sides and in many forms. Sometimes, it is very noticeable, like, for example, in the case with all that hype about iPod or iPhone or what’s the lates gadget from Apple is called these days… But sometimes, it’s totally silent and natural and it seems like it was there for ages. Although it wasn’t.

This thought comes to me often when I am about to drink tea. No fire, no towels, no pots or kettles. Press the button and a small plastic bucket will provide with plenty of hot water in a couple of minutes. Pour some in the cup and drop the tea bag in. Done. Oh, wait, it’s too hot. Open the fridge, take a couple of ice cubes and drop them in the cup too. Now it’s just right.

Think about it. How natural that is now. I know at least a dozen people who do this on a regular if not daily basis. But even less than 50 years ago, fridges weren’t coming with ice makers. In fact, they were making ice that nobody wanted and had to unfreeze their fridges once in a while. And nobody I knew was even thinking about making ice themselves or using it for tea. Perhaps it was different in other areas of the world, but something tells me it wasn’t very different. And tea bags too weren’t the preferred way of making tea. And water was boiled using gas cookers. And so and so forth. But now, not it feels like it was always available.

There are plenty of other examples. Mobile phones, for example. They still look odd when used by older people, but in general they are a part of everyday life of everybody I know. That wasn’t so even ten years ago. Cars, digital television, Internet. What else?

Keeping up

Web Workers Daily runs an excellent post, asking the question:

What tools and techniques do you use to control your attention online?

It falls into a general productivity area. How can one stay more focused and to The Right Things? This is the question that I am trying to answer for quite some time now.

One of my recent approaches was to not do anything that is not on my TODO list. I promised myself not to put any crap on the list and to do only things which are written their.

Unfortunately, that failed. I managed to not put any crap on my list – that I can say. But, regardless, my list always grew so long that I never felt like doing anything at all that was written there. Occasionally, I would complain that the TODO list application is not doing the right job of prioritising my tasks, or is too difficult to use, or is not flexible enough, or another million excuses not to work. And then I’d change the application to another one, and start rebuilding my TODO list, until it once again gets too long.

And, of course, I kept doing plenty of stuff that wasn’t on the list. “Read email” and “Check news in feeds at Google Reader” didn’t sound like plausible TODO list items, yet were something that I had really wanted to do.

During my search for the solution, I managed to find a few things that help though. One of them is closing the Google Reader browser tab. Even if for a few minutes. I used to have it always open and was used to switching to it between the tasks – when another page takes too long to load, for example. That’s playing with fire – it’s too easy to get out of focus and forget what I was doing. So, I’m keeping it closed now for as long as I can. Then open it, read some news, and close it again. The opening part seems to help my productivity – I don’t like to open and wait for things to happen, so sometimes I decide to not read the feeds, because it’ll take too long to load them.

Another thing that I found helpful, was rather surprising – KMail’s new mail notification in the taskbar. It shows the number of new messages in my inbox (work related email, my private stuff is still in GMail). Before I used to check my email just to see if there was any new messages. Now, I know if there are. As I said, surprisingly, this had some effect on how I work. I can’t resist checking email to answer the question “Are there any new messages in my inbox?”, but I can hold on answering “What are all those people writing to me about?”. Wonders.

Something that will further help me, but that I haven’t started to use yet is my instant messaging statuses. For now, I’m either online and available, or offline. That’s not enough. I have to work and concentrate sometimes and should start using the “Away” and “Do not disturb” statuses.

The week gone crazy

I’ve been a bit silent here, again. That’s because we are having a crazy week in the office. Yeah, I know, everybod says it. But I really mean it. Let me give you a brief overview of what’s happening:

  • We are finishing up not one, but three projects. One of them is in a totally foreign language, and two others with plenty of programming involved. These last two will show WordPerss in a new light. They won’t look like blogs even for a bit. Even some #wordpress people were impressed. Stay tuned.
  • We signed up one bigger client, who will need a heavily customized web solution. And that is for an industry that we aren’t very familiar with. We are studing our books now, and looking for more.
  • It seems that we found someone who fits our web designer vacancy. We’ll are communicating a lot now and wil probably try each other on a project before going any further. The vacancy is still there tough – if you know anybody, please give them a buzz.
  • We are re-shaping our marketing strategy somewhat. It seems that I’ll be even more silent for the months to come. In any way, it will either work out, or not.

Back to work now…