Back to blogging?

March 10, 2008 at 9:27 pm | In Uncategorized | Leave a Comment
Tags: , ,

The whole year 2007 was quite busy and a lot of things changed. It was very fruitful, same as beginning of the year 2008… Now a few things changed. First, I am back to blogging and got a couple of new ideas.

See you soon.

Snapshots of a PHP enterprise developer ’s life ( How I needed CCTV… )

July 11, 2007 at 4:42 pm | In Application Architecture, Code, Design, Design and Implementation, Software, codebloke, framework, http debugger, ide, komodo, lamp, mysql, php, php5, user experience, zend | 1 Comment

This article is actually meant to be praise for Komodo 4.1 IDE (a reasonably priced PHP IDE with HTTP debugging features), but when I started to write the post I realised that the whole story must be told from different angle. Not that the Komodo is not worth praising, it is and that’s for sure. However, since the story evolved I’ve taken decision to post a link to community version (Komodo Edit) and make a point regarding much more complicated matter. And so it happens a bit more important if you pay your bills implementing business logic with the PHP5 and LAMP like I do.

Story in brief is about knowing and not guessing, but let me start with some memories of the past.

History

While working for a UK email marketing company some time ago (I am still thinking if I should mention them in this article…) I was developing a couple of new features. Long ago this company decided to use very complicated application stack. It’s enough to say that Postgres, PHP4 and XSLT were running under one roof (sometimes) delivering… transitional HTML.
So, every time a helpdesk ticket was initiated by the fault report I heard the same mantra being sung to clients “we cannot replicate the error”.

From the very beginning I felt it wasn’t right to do bullshit talking to the clients that pay your bills. I knew how to make web-based system fully monitored. Problem was that with this company (for the first time in my life) I plunged a bit with my own projects, system was undocumented and the other senior developer acted simply like a jerk. As you see it’s wasn’t the perfect positions to address my bright vision of a fully self-aware web-based application server. Especially that this “dotcom” company, located in the countryside had a huge problem with equipping developers with a new dev server, we also suffered electricity shortages from time to time and the internet uplink was down pretty often… However I liked the rural setup (see video below).

So, I started to develop that solution on my own and ended up with a very efficient piece of code that I called CCTV, which allows:

  • Remote side profiling
  • Login / logoff based on database-stored sessions
  • Real-time application input and output logging
  • Detecting users opening application with multiple browser windows

System creates “remote side” profiles based on ip/proxy/network block/country/browser and you can compare these profiles with all logged HTTP requests, i.e. searching for fraudsters (without laborious strings digging).

I don’t need to explain that unlike file-based PHP sessions this system can be distributed across database cluster without even breaking the sessions. Also, you can use multiple web and database servers. In terms of uptime, mixed with stuff like i.e. round robin (internet) or hiding web server behind a load balancer (in LAN) it makes your application virtually invincible (with “virtually” stressed). Another benefit here is that you can centralize session’s management and logoff one or all users even though the session (or cookie) has not expired yet.

Real time output logging makes sense only in the development phase (UX – User Experience, cross-browser functionality checks, etc.). One of the features I like is that when you forced user’s logoff having output logging turned on, you can rebuild his “last seen” application state when he logs back.
I don’t need to explain significance of that… it simply undermines the dogma of HTTP being a stateless protocol. Not anymore…

So, I started to think of all this looking at Komodo which has HTTP debugger built-in and having that tool I probably would never start my CCTV project…

Today

I am now senior developer at World First in London a foreign exchange company with yearly turnover of approx. 3 billion GBP (roughly $6,000,000,000.00).

Part of my job is development of the dealing application in the Intranet that runs on LAMP and CCTV is a part of it. Just looked at the stats… so, running PHP5 and MySQL 5.20 we serve over 180,000 HTTP requests daily (which means apporx. 80,000 database transactions a day) and I can restore every second of the system’s life, as easy as if I had a rewind button.

Future?

When you deliver a platform (and PHP5 surely is a platform), you must deliver a coherent application framework. Not for internet, blogging, CMS, etc., but for the enterprise. Otherwise you force the developers like me to do your job.

Now, assuming that MySQL 5.2 is now really a database… then maybe it’s a good time to stop playing funny guys and together with MySQL AB you deliver a unified application platform with all features mentioned above with the C-implemented sessions functionality?

I wonder if guys at Zend realize already that even support of IBM’s DB2, or projects like OPAL (trick with Oracle’s support for PHP), these are simply jokes when the only thing decent with PHP is so far the language syntax – inherited anyway.

Don’t get me wrong. I am a big PHP fan and I wait for a situation update… but seems to me like they decide to make money on events and that type of crap, rather than software.

Martin

Job for PHP Developer (SQL, XML, LAMP) in London

May 30, 2007 at 10:39 am | In Uncategorized | Leave a Comment

Hi there!

World First is looking for next PHP developer to work in our office in London – it’s permanent role.

Skills required: SQL, XML, LAMP platform experience, etc. Please click here for details:

http://www.worldfirst.com/php_developer_job_sql_xml_london_22k_to_28k.html

World First UK Ltd. – Currency converter ( web-based & live! )

May 8, 2007 at 4:52 pm | In AJAX / XMLHttpRequest, Code, iframe, webdesign | Leave a Comment

World First, foreign exchange and currency transfer company in London provides webmasters with extremely useful tool.

World First handy currency converter is a service that you can easily integrate with your website or even eBay auction.

In order to get access to the dedicated converter cut/paste code you need to contact World First. It’s calling the converter as HTML iframe so no coding skills required.

Live converter and all-two-lines-code sample here: www.codebloke.co.uk/FxConverter

Microsoft propaganda (on London Stock Exchange)

December 27, 2006 at 10:13 pm | In Uncategorized | Leave a Comment

Link from Slashdot:

(…)Windows Server System outperforms Linux on Total Cost of Ownership (TCO) (…)
more:
http://www.microsoft.com/uk/windowsserversystem/getthefacts/default.mspx
We’ve got year 2006 (almost 2007) and Microsoft’s propaganda says it’s a triumph ;-)

Windows 2003 (!) vs. Linux (of undisclossed distribution)

Marketing jabber…

Guys, wake up! Selling a four years old server system is a joke!
In the other hand, it’s probably the most stable MS system ever… ;-)

Microsoft .NET Framework 2.0

December 14, 2006 at 1:00 pm | In Uncategorized | Leave a Comment

So… new project and it’s a classic LAMP setup (linux apache mysql php) to make work on SQL quicker I downloaded the TOAD for MySQL.

I’ve got the file now… what I’d need now is the Microsoft .NET framework 2.0.

Well, I don’t know…

Well, so the moral of the story is:

You can run, but you can’t hide!

Flickr.com – Codebloke’s photographs

November 20, 2006 at 3:47 pm | In Blogroll, Design, Images, Philosophy behind solutions, Photography, Web 2.0, image | Leave a Comment

I shared the way I see the world on Flickr.com. To see just click: http://tinyurl.com/yzc7p9
and this is my favourite one: http://tinyurl.com/ylkcb7

http://codebloke.wordpress.com strikes back – User interface for WEB (2.0:-)

November 18, 2006 at 11:52 pm | In AJAX / XMLHttpRequest, Code, Philosophy behind solutions, Web 2.0, Wordpress.com, development | Leave a Comment

Howdy,

please take a look on my newest article on user interface and accessibility issues for web, Web 2.0 as well ;-)

http://codebloke.wordpress.com/user-interface-in-web-applications-abstract/

wordpress.com efficiency problem

November 17, 2006 at 9:03 am | In Wordpress.com | Leave a Comment

Good Morning,

I started the blog yesterday and created two entries. Then yesterday, late afternoon I came back to change something and a ‘funny’ system message appeared.

This is screenshot:

wordpress.com - 5 minute hold

You see, 5 minutes is not a big problem, but after 5 minutes nothing really happened…

What is even more bizarre is the fact that the update was actually successful, only the date was somehow cleared (wordpress.com keeps the date as integer value) and we were back in the 1970.

Timestamp problem

Cool! I wish it was that easy to do…

Ford Mustang 1970 (Unix epoch)

but it’s not.

Conclusion:

To the guys at the Development Team of wordpress.com… Please, if you store the ‘last_update’ timestamps as integer values, don’t zero them during ‘transaction’ if you’re not sure if it will be successfully finished (commited).

Plus. There is a number of simple tricks to prevent users from re-posting forms. Displaying messages to “not use back” is stupid. People use browser’s BACK button and always will do…

Web 2.0 is …

November 16, 2006 at 2:08 pm | In AJAX / XMLHttpRequest, Code, Web 2.0, development | Leave a Comment

Growing number of “community” companies around, constant media pressure and self-proclaimed industry leaders waiting to be recognized.

Hard to distinct buzz from a real value that the Web 2.0 brings.
So, what actually is the Web 2.0?

Actually, my perspective on that is simple :-) It’s just a different way to describe what we’ve got on the table for years, but it’s a good way and for me, worth to follow…

Web 2.0

Five down-to-earth reasons to consider Web 2.0 a real breakthrough:

  1. For the first time as a mass and common approach to development we have strictly defined interfaces (API’s) accessible via network,
  2. Not only the interfaces, but also responsibility is strictly defined,
  3. …and really documented, from the Day One online.
  4. It practically introduces SOA (services oriented architecture)
  5. Ends all discussions on “which programming language is the best for Web”* ;-)

*) answer: one you can create an efficient API with…


However, talking is a cheap sport and would be nice to demonstrate what I mean.Maybe with some working piece of code…


Problem description...

Let’s say we need to:

  • Verify delivery address and post code entered by users at the checkout in our web-based B2B ordering system (to avoid possible shipping problems like i.e. delays, returns, etc.).
  • Initial purpose is verify the data as they’re only entered on the website, but…
  • We need to create a reusable solution, so that it can be used from different platforms (i.e. just in case we would like to extend that functionality on verifying delivery data for orders collected by phone).
  • Almost forgot… we’ve got a budget of approx. £200 for that project because this equals a monthly operational cost for re-processing the shipments. Re-delivery cost is usually invoiced on customers as it’s their fault*. They gave us incorrect address, right?

*) Fact: Customers don’t like to pay twice, even if it’s their fault… Plus, your customer care department will spend some extra time on calming them down, but it’s hard to indicate that as direct result of not sanitizing data input, so thing can be successfully masked ;-)

Concepts
Post codes in the United Kingdom it’s not really a complicated issue.

For £750 you can buy CD with raw data from Royal Mail and keep it local.

Royal Mail provides also a ‘Find a postcode‘ service – available here:
http://www.royalmail.com/portal/rm/postcodefinder
Search options there are limited to 12 addresses a day… so not really something we were looking for. Plus, we wanted a unified interface. Hmm…

Implementation

I believe that every 9 y.o. computer geek (even without the MCP) knows how to manually verify address (post code…) with a browser and a search engine.

Our implementation will do exactly the same:

  1. We collect unstructured data set from public websites, here google.com, yahoo.co.uk, viamichelin.com and yell.com
  2. We compare the results
  3. We format results in industry standard XML document

Post codes to XML verification

So, we’ve got a web server (1) that is processing requests from users (2) or servers (3). This machine communicates with other web servers (A) fetching for public content and connects my MySQL-to-XML database (B) that contains phone prefixes.

As long as we can provide a correct UK post code we should get a correct set of detailed information formatted as XML.

XML code

Code in action

The result XML above was generated trough a URI:
http://www.codebloke.co.uk/XML/?asXML=MK42+7BU&go=check

Now you can test your sample UK post code over simple web form published here: http://www.codebloke.co.uk/XML/form/

-

Next Page »

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.