Bleadof’s world of tinkering

June 21, 2006

Oracle instant client basic, PHP >= 4.3.9 and Centos

Filed under: Jyväskylä University Library, Tinkering, Work — Bleadof @ 14:06

Whoop-di-fucking-doo!, I didn’t know that getting Oracle database connectivity in PHP 4.3.9 could be this hard to get working. Here are the tricks.

  • Find oracle-instantclient-basic-10.2.0.2-1 as RPM.
  • Find php-oci8-4.3.9-3 as RPM.
  • Install them, restart apache and you’re done.

Sounds easy? Well it’s not. Reason: those packets were hard to find in the first place. Why? Apparently oracle doesn’t want the instant client to be found as rpm. Most of the howtos you’re told to compile PHP from tarball and that’s just not the way you want it to be done. Anyhow I succeeded and now i can use AdoDB to connect oracle database. You know that oci8 is working when you check phpinfo() for oci8 module enabled

June 20, 2006

Bloody hot in here, I take off all my clothes…

Filed under: General whining, Jyväskylä University Library, Work — Bleadof @ 08:06

I wish… It’s extremely annoying to work in conditions where you have to be in a room a day where the temperature is about 30 degrees Celsius. There’s no fucking sense in this. I want air conditioning! Or at least some sort of cooler. I’M SUFFERING!

Edit: I got a cooler, now it’s not so bad. \o/

UI designing

I’ve started designing the user interface for the Receipt loan system. I’m making it like a webshop of some sort because the nature of the loans can varie a lot. There can be many different kinds of items connected to one loan from magazines to maps. So the nature of webshop like surfing and selecting items should suite the needs quite nicely. When you’ve selected all of your stuff then you just click Loan and the system does the tricks for you.

Kuittilaina screenshot

June 15, 2006

I’m fat but not for long!

Filed under: Just something — Bleadof @ 22:06

Today I challenge my irc-friend Antti ‘BCOW’. He has decided to lose 10kg of his weight. I’m going to challenge him not in weight but in time. I’ve decided that I will loose 5kg in two months. So now it’s final!

How I’m going to do it, well I’m going to start going out more and cycle as much I feel good doing. I’m not going to pay too much attention to my diet, only that I don’t go over the top with it. So I’m also trying to get fit. I have a bit of belly and I’m going to get rid off it.

I started today by cycling around Tuomiojärvi with Hannu ‘quercus’. and we decided that tomorrow, if the weather is good, we’ll cycle to Vaajakoski. Wish me luck \o/

June 13, 2006

#tolkien meet in Jyväskylä 29.-30.7.

Filed under: Just something — Bleadof @ 19:06

Info

  • Time: 29.-30.7.
  • Place: Jyväskylä@zayah
  • Host: zayah

So, if you’re up to it, just post a comment !

June 12, 2006

PHP4 OOP and references

Filed under: PHP, Programming, Tinkering — Bleadof @ 13:06

So today I decided check PHP4 OOP quirks. So now I know for sure how my code is going to behave. I wasn’t really sure how the PHP4 behaves with references so I did a test.

class ReferenceTest {

  var $reference;

  function ReferenceTest() {
    $this->reference = new Reference();
  }

  function getReference() {
    return $this->reference;
  }

  function &getReferenceReference() {
    return $this->reference;
  }
}

class Reference {

  var $var;

  function Reference() {
    $this->var = "";
  }

  function setVar($var) {
    $this->var = $var;
  }

  function getVar() {
    return $this->var;
  }

  function &getVarReference() {
    return $this->var;
  }

}

$rt =  new ReferenceTest();
$ref = $rt->getReference();
$ref->setVar("bar");
$ref2 =& $rt->getReferenceReference();
$ref2->setVar("baz");
$ref3 =& $rt->getReferenceReference();
$varRef =& $ref3->getVarReference();
$varRef = "baf";
$ref3->setVar("foo");

print "ref:".$ref->getVar()."<br/>";
print "ref2:".$ref2->getVar()."<br/>";
print "ref3:".$ref3->getVar()."<br/>";

Do you know what is the output? Here’s the anwser.

June 9, 2006

Last.fm love \o/

Filed under: Jyväskylä University Library, Tinkering, Work — Bleadof @ 09:06

I presume that I’m not the only one who has noticed the lovely features of the Last.fm player… It’s so cool that you’re able to listen your favorite music still at work and not actually being forced to bring the music with you or start streaming from home.

At the moment I’m subscribed because they’ve been messing around with my charts. This means I’ve more radios available than as a normal user. I’ve been mostly listening my personal radio but sometimes it’s nice to hear something new and I listen my neighbour radio. Fun \o/

Now some work… Started to poke around some on the old system. It’s totally crappy. There’s a lot of things which could easily go to The Daily WTF, but I can’t be bothered to submit them. I think I’m suggesting that we throw the old system to trash and do a proper one with OO PHP. Would be nice to actually just use Python but I guess it’s not possible.

We’ll see what happens…

June 5, 2006

Ah, the joy of non documented software…

Filed under: Jyväskylä University Library, Work — Bleadof @ 14:06

Blah, the system which was done last year is, of course, poorly documented… We got a paper document describing the database, guess if it actually corresponds the actual database structure ;) . NO, of course NOT!

This is one of those systems which have done in a really odd style. The style basically varies throughout the whole system. It’s quite hard to get a grip of it. We’ll see what else comes up when I read the whole code through…

As I’ve written before, it’s not just me who is working on this system. There’s also a guy called Tero who is also an intern. It seems that we’ve more or less divided the job so that I’m doing the user interface design and the stuff which is related to it and he’s concentrating more on the code part. This is kind of nice in a way because I’m a bit of fed up with PHP anyway ;)

Laters…

June 2, 2006

Working in Jyväskylä University Library

Filed under: Jyväskylä University Library, Work — Bleadof @ 09:06

Yei! I started working in the Jyväskylä University Library yesterday. Woke up like 7 am and went to work at eight. Scary stuff waking up so early. I guess you get used to it.

Some of the people are asking what I’m doing, well I and my collegue Toni are working on a PHP/MySQL based system which is in Finnish called “Kuittilaina”. The free translation in English would be something like: “Receipt loan”. Basically the development of the system has started last summer and we are continuing the development. I have not yet a good grasp of what is needed to do with it but I’ll probably post the stuff I come across here.

I’ve been looking at the code now and parts of it look ok but another part is just horrible which is quite usual when you’re mixing the layout and the logic together… So basically we’re going to rewriting of the code so we can use Smarty actually make it easy to change layout to what ever someone might want ;)

We see how it goes. Laters \o/

Powered by WordPress