2 views
1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)
Loading ... Loading ...

03.06.10

Developing for multi-cores and the cloud

Posted in Random Thoughts, Tech at 1:13 pm by liviu.tudor View Liviu Tudor's profile on LinkedIn

I have noticed recently that “cloud” and “multi-core” became buzz words in the Java world. (About time if you ask me!)

The interesting bit is the implication it has on writing code — and so many developers (and not only!) are blogging their nuts off about this. All of a sudden it is ok to break design patterns and OOP principles in order to make your code multi-core friendly and parallelize it as much as possible, in order to get that extra bit of “juice” out of it. Finally the world came to realise that OOP are good but quite often you will have to sacrifice some of your design and architecture in favour of the response time. Because let’s face it, that’s the one that really matters — to your users. I couldn’t care less if Twitter was modularly designed to allow for easier extensibility and maintenance (to use one of the favourite phrases of the OOP evangelists) or whether there were any GOF design patterns applied in their code — but if my they are down or my tweet doesn’t make it through or it takes ages, I’ll give up (for a few days). (That doesn’t sound like much to you and me but for Twitter it means losing all the valuable traffic — which ultimately will have to convert to revenue.)

I’ve had some funny looks in the past when working on various systems and proposing approaches that violated OOP designs — but focused on the speed of the application — and every single time I had to seriously ask myself having encountered these reactions “Am I going mad or do they not see the pro’s in this?” As it happens I won half of those arguments and lost the other half — pretty sure as well that the thoughts of the ones involved in these discussions were 50/50 split in between “he’s a useless lunatic” and “he’s got some good ideas”. It’s interesting to see though some of these people who were waving the OOP flag now changing sides (though they don’t seem to realise it, which makes it quite funny!) and go preaching the humankind about stateless static methods and the likes.

Somehow, this reminded me of the problems one used to have when the Sinclair Spectrum was around and if you were programming games (ahem, though the term “games” in this context is quite loose :) you wouldn’t do a for 1..3 whatsover, but actually copy the block of code and paste it 3 times in order to save those precious processor cycles! We’re not far away it occurs to me from doing this with the “cloud-based” approach of writing our Java apps it seems — and it’s actually ok now all of a sudden to do that! (As a side note, a for is difficult to distribute — while your unit of code called 3 times might be a good candidate for distribution across different cores.)

So I am somehow waiting for the day when some voice of authority in Java will publish the “Un-design patterns for multi-cores and the cloud” book — and no doubt everyone will embrace it! — and then I bet you Java (8 ?) will become more of a C-like clone which can run multi-platform. Oh no, wait, we already have portable libraries in C! :D

496 views
1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)
Loading ... Loading ...

16.04.10

What Do We Use the Internet for Nowadays?

Posted in Blogroll, Fun Time, Random Thoughts, Tech at 11:39 am by liviu.tudor View Liviu Tudor's profile on LinkedIn

If you ask Joe Bloggs what he uses the net for nowadays, a common term that pops up is “research”. People use the net to learn things — not a bad idea at all! After all, the information (in most cases) is out there, just waiting to be found. And with the competitiveness of the search engines nowadays, you are nearly guarantee to find exactly what you’re looking for. But what do we “research” online?

Since Google introduce its suggestion-based search service — which pops up a list of suggestions based on the most common search phrases related to your search — it’s easy to figure out what most people are searching for. So if I want to know what most people are trying to learn about all I have to do is to type “how to” in Google and wait for the suggestions to pop up. And I did just that! And behold! here’s what our Jo Bloggs what to learn nowadays:

google howto

It appears our average internet citizen is lacking a lot of knowledge in the kissing technique department as this comes first as you can see — one would think that having some real practice rather than reading about it would solve the problem though, huh? Also our average google user seems to be spending most of his/her time in front of the PC with very little exercise probably — hence the need to lose some weight — and fast, cause damn! I need to get back to my internet searches! I’m guessing the weight was assimilated due to the pancakes they keep making — and seem to be getting wrong all the time, since they’re still looking for instructions on how do make them.

The getting pregnant bit though is a brilliant one, you got to admit — even more so in the light of “having sex” being way down the list — I’m envisaging the following scenario:

Joe Bloggs thinks “ok, I’m feeling kinda lonely here in front of my PC the whole day — maybe I should get a child. Hmmm… how do you do that? I know, let’s get pregnant — I heard that does it! “ So out comes Google: “how to get pregnant” … “Sh…ugar! I need to have sex first! Right, how do I do that? Oh, damn, I need to get fit! Right — how do I lose weight fast and get a six pack? hmmmmm not so easy it seems. Perhaps there are other ways to get laid easily … let’s see — oh yeah, having lots of money! Right, how do I make lots of money? …. hmmmm another tough one! Oh bo…cks! This is hard work — I’m knackered and hungry already. Where are my pancakes?” :)

1,800 views
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.33 out of 5)
Loading ... Loading ...

08.12.09

Debian Linux, exim4 and Outlook 2003 TLS/SSL Config

Posted in Blogroll, Tech at 5:17 pm by liviu.tudor View Liviu Tudor's profile on LinkedIn

The following might seem obvious for some of you but I felt the need to publish it as it took me ages to get exim4 and Outlook 2003 to work together with one of the domains I’ve just bought.

In brief, I’ve bought a new domain (call it example.com) and I went this time for a proper dedicated hosting (rather than shared hosting) — which meant I had a physical machine that I had to administer myself. I’ve chosen Debian Linux as the OS for it — for various reasons that are outside the scope of this post. I’ve chosen exim4 (more specifically exim4-daemon-heavy) as my MTA and decided to go for courier-imap (over SSL) to read emails.

Obviously I had to generate a self-signed certificate — and I found the instructions on http://wiki.debian.org/SSLkeys very useful for this. Having set courier-imap-ssl up, Outlook was able to read straight away my emails over IMAPS (obviously you get a prompt informing you that the identify of the authority creating the certificate cannot be verified but that’s just a minor glitch :)

Having configured IMAP it was time to move onto configuring exim4 — and I needed to have exim accept email normally for my domain (example.com) and obviously prevent open relaying — so unless the email is intended for a user in the domain example.com then the user will have to be authenticated. Now that is very easily configured (in fact it’s present by default) in /etc/exim4/conf.d/acl/... (I use a split file configuration).  In order to enable TLS (on port 465) I have the following in my /etc/exim4/conf.d/main/000_localmacros:


daemon_smtp_ports = 25 : 465
tls_on_connect_ports = 465
MAIN_TLS_ENABLE = true

In terms of authenticators I had only 2 set up:

plain_server:
driver = plaintext
public_name = PLAIN
server_condition = "${if crypteq{$auth3}{${extract{1}{:}{${lookup{$auth2}lsearch{CONFDIR/passwd}
{$value}{*:*}}}}}{1}{0}}"
server_set_id = $auth2
server_prompts = :
.ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
.endif

cram_md5_server:
driver = cram_md5
public_name = CRAM-MD5
server_secret = ${extract{2}{:}{${lookup{$auth1}lsearch{CONFDIR/passwd}{$value}fail}}}
server_set_id = $auth1

(all the others have been commented out)

Now this configuration worked just fine with the likes of Thunderbird (configured to authenticate both at receive and send email) and my messages were sent just fine. In Outlook though, I could only receive emails and any time I try to reply to any emails received (or simply just send a new email) exim throwed an error about relaying not being allowed. Which basically said to me that Outlook was not sending the authentication at all when sending emails. Having talked to Andreas Metzler (on the Pkg-exim4-users mailing list) it turns out that Outlook only does NOT support AUTH PLAIN and only supports the AUTH LOGIN method — so I had to add the following section in my authenticators section for exim:


plain_server:
driver = plaintext
public_name = PLAIN
server_condition = "${if crypteq{$auth3}{${extract{1}{:}{${lookup{$auth2}lsearch{CONFDIR/passwd}
{$value}{*:*}}}}}{1}{0}}"
server_set_id = $auth2
server_prompts = :
.ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
.endif

cram_md5_server:
driver = cram_md5
public_name = CRAM-MD5
server_secret = ${extract{2}{:}{${lookup{$auth1}lsearch{CONFDIR/passwd}{$value}fail}}}
server_set_id = $auth1


login_server:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = "${if crypteq{$auth2}{${extract{1}{:}{${lookup{$auth1}lsearch{CONFDIR/passwd}{$value}{*:*}}}}}{1}{0}}"
server_set_id = $auth1
.ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
.endif

Having restarted exim4 all worked well! (Bear in mind that you do need to configure your Outlook to use port 465 for sending emails and also you need to configure it to authenticate on SMTP!)

While configuring my system I also found this link very helpful: http://pkg-exim4.alioth.debian.org/README/README.Debian.html — and obviously some of the mailing list archives which can be reached from this link.

612 views
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.33 out of 5)
Loading ... Loading ...

18.11.09

Kodak ESP9 Printer + AiO Software

Posted in Blogroll, Tech at 9:12 pm by liviu.tudor View Liviu Tudor's profile on LinkedIn

To those who may concern: if you are using an all-in-one Kodak printer and are experiencing difficulties with either installing the software from the installation CD or using the Kodak AiO Software (once installed) to set it all up, here’s a handy “tip” which will probably save lots of time and talks to Kodak helpdesk:

First of all go to Kodak’s website and download the latest AiO software for your Windows version. I know the original CD software has an option that reads “install the latest software downloaded from Kodak website” but trust me that’s not entirely right, as that option misses out a few components. Secondly, don’t try to run the downloaded version straight away, as this will only check your printer driver version (and not the rest of the software versions included in the package as well!) and will just tell you that you already have the latest version and refuse to continue with the setup. Instead, go to Control Panel and remove the AiO software entirely first and only then install the downloaded version — upon install you will see that this software reports that it needs to download a few more components (which, believe me, in my case were actually essential!) and finally will proceed with downloading and installing them. At the end of that you will truly have the latest printer drivers and more importantly the latest AiO software version!

In my particular case, because I didn’t have the latest AiO software I couldn’t change the Fax address book and it became such a pain in the backside to have to enter fax numbers by hand every single time I had to send a fax. And I’m sorry guys from Kodak, but you are useless at spotting this or in fact accepting that this is an issue and simply just take it for granted that if your software reports that the latest version is installed that doesn’t mean your software is right (and in this case it definitely isn’t!)

Dixit!

257 views
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.50 out of 5)
Loading ... Loading ...

02.11.09

ClickHeat

Posted in Blogroll, Random Thoughts, Tech at 9:01 pm by liviu.tudor View Liviu Tudor's profile on LinkedIn

Just installed ClickHeat on my blog — while there’s no stats just yet for it (literally I’ve just installed it) I would be curious to find out whether the click heat map does follow indeed what Nielsen presented quite a while back on his useit.com… Stay tuned :)

« Previous entries Next Page » Next Page »

Interesting site about getting Londoners chatting during their daily commute I Can Talk, Me!

( ! ) Warning: fsockopen() [function.fsockopen]: unable to connect to twitter.com:80 (Network is unreachable) in /usr/share/php/libphp-snoopy/Snoopy.class.php on line 1142
Call Stack
#TimeMemoryFunctionLocation
11.318420559136shutdown_action_hook( )../wp-settings.php:0
21.318420559136do_action( )../wp-settings.php:729
31.318620559136call_user_func_array ( )../plugin.php:339
41.318620559136aktt_update_tweets( )../plugin.php:0
51.325820808956Snoopy->fetch( )../twitter-tools.php:702
61.325920809040Snoopy->_connect( )../Snoopy.class.php:143
71.325920809040fsockopen ( )../Snoopy.class.php:1142