Welcome to LjGww's Blog

Here we will see...

Pages

Wednesday, December 21, 2011

Identify yourself! :)

We rarely think about how other see us. When I started with Internet in some mid 80ties, internet was fantastically anonymous. Soon afterwards this anonymity was ridiculed in many ways. Then suddenly in 2000+ things take amazing turn: Instead of preserving anonymity, whole approach turned upside down and suddenly people registered to Internet as themselves. Not only that, but they started bluntly sharing their personal lives with others. Once someone's personal life becomes public life, rules of the game change. Someone can actually look what you think, what you like, what tick you. Of course if they are interested in you, which many put forward as an argument. Additionally since you declared that this is yourself on the internet you can use it as some sort of ID. And voila suddenly we have OpenID ... http://openid.net/ extremely useful but double edge sword web facility.

There is another side of the coin too. Do you google yourself? What google knows about you someone will also research if they are interested in you. Who that may be? One very important player in your life - your employer! Internet savvy employers may screen candidates by their digital footprint. So I will ask you again: do you google yourself sometimes? I found out that I am contributor to some church in Vancouver area :) I am not of course, but searching my name and surname brings lot of funny outcomes. Even photos!!!

To take this thing lightheartedly and see benefit of it rather than dark side it does pay a little bit of attention what you publicly say....

On the other hand you may gain something else ... being recognized. How to do that read on http://www.avc.com/a_vc/2011/12/lightweight-identity.html

Tuesday, December 20, 2011

Sunday, December 18, 2011

Life rummage

It has been ages that I have written something here. Its about time, as few new developments are worth noting...

First, blast from the past. Some almost 30 years ago I have participated in Computer revolution by being a member of the team that have built these computers http://en.wikipedia.org/wiki/Galaksija_Plus and later http://en.wikipedia.org/wiki/TIM-011 what wikipedia tells you is not really true, as behind Tim 011 there was only 3 persons that were not from the Institute Mihajlo Pupin. But that is political matter. Official history is not always true. But that is life matter. (it also puts me to thinking how many "facts" on wikipedia may be untrue) However, something has happened that has made me smile and that was this one:

http://galaksija.petnica.rs

I find this move of authors ingenious... Galaksija that in our case has spawned plus version and later TIM computers has actually been forgotten for nearly 30 years. In the meantime Z80 processor that has been heart of so called home computer revolution of early 80ties has found its place in most unexpected places: telephones, advanced calculators, tv sets, all sorts of micro controllers, etc...

Riding bad political vibe but excellent explorers vibe I wish and will strive to give my tribute to this project as to make some kind of life circle.

This small package is surprise on its own.

Webbing

I have put aside for a while working on web development, although I finally stepped on some great stuff. Would like to draw your attention to couple of web places I find increasingly amusing.

http://www.wolfcms.org/ - why I find it amusing? Because it is at the right middle between some web framework and over-bloated CMSes like joomla, drupal or typo3. For ones that need a website that they can extend with their web wizardry this one is more than recommended.

Web framework quest

Ones that have read my previous posts could have noted my Oddysey through web frameworks while trying to find something that would help me to write web applications quicker and more standardized. If you haven't done so, read previous posts, to find discussion of the requirements that I sought. Finally and almost accidentally I stepped on this, I must say, ULTRA FINE approach to framework:

http://www.slimframework.com/

Its simply a piece of WEB ZEN! If you are after small web app that may grow, consider not starting from an empty code page in editor but starting with the Slim Framework and you could get amazed what it can actually offer to you.

Re-Microsofting

People that know me know that I'm not particularly fond of Microsoft. I never was. Its also true that programming Microsoft stuff has paid some of my life periods. I could be hitting such period again, not too happy about it but also amazed with some movement within Microsoft area. I will point you to two for me pretty amusing areas, but before I do lead you into Microsoft dark forest :) I'd like to mention another aspect of my understanding. I never liked Java as well. More world has been pushed towards Java i felt more animosity against it. Poor Java, it is not that bad language with good intentions and dirty business games. Microsoft .NET answer to that made me not even thinking of starting to do something with either of them....

Time passed and my animosity towards these approaches kinda wearied off. I was not pushed to use them, they could exist aside from me and I could perfectly spend my time on HTTP waves and web applications. But... recently I got request to re-think some system, and being old school of windows programmer that spent time with COM and COM inproc's started wading trough new MSDN. To my amazement I found some neat new stuff while noting that MSDN of some 12-14 years ago at which I would swear at was chamomile tea compared to over-written-under-meaning msdn of today. But somehow I find it fun to start writing windows service in vb.net and explore these two things I want to mention as things worth noting:

First one, which I did not go deep to explore but understood potential was a new command shell for windows called Power Shell....

http://msdn.microsoft.com/en-us/library/windows/desktop/aa973757(v=vs.85).aspx

do not be a-strayed with MS definiton of it. It is fine programming tool that DOS shell (or 4DOS shell) was attempting to be and WSH (windows scripting host) was too much of a programming approach. I believe for ones that would like to blend programming with the system administration and creating solutions out of business rules and procedures I would recommend spending some time studying Power Shell.

Second thing that has caught my attention quite strongly is another aspect of .net world. But before I explain what it is let me go back a bit into world of early MacIntosh computers. I know you'd murmur WTF? But i will be bold and toss in first generation of digital mobile phones, old Netscape browser and WWW into the soup and claim they have all attempted the same! I could possibly hear louder WTF? has Microsoft, Old MacIntosh, Netscape, cell phones may have in common. And I will say - DECOUPLING! Story begins with HyperCard on an old Mac's - HyperCard was possibly the most humane software ever built for information processing - that was never understood until WWW proved to be success - but WWW was only a HyperCard concept put on a network... First generation of cell phones have had WAP system that was conceptually based on stacks of presentation cards - almost a clone of HyperCard on post stamp size screen, Netscape made simillar attempt with web page editor built into the browser and putting JavaScript both on client and server side. All of them attempted decoupling we call today MVC paradigm (Model View Controller), in my understanding this shall be rather called VCM by seeing first View of a stuff, then through Controller understand Model of a database (or knowledge storage). Where is in all that soup a .net? It is not actually .net itself but something called Windows Presentation Foundation (see http://en.wikipedia.org/wiki/Windows_Presentation_Foundation) to be more particular something that I find rather usable is XAML:

http://en.wikipedia.org/wiki/Extensible_Application_Markup_Language

The idea that you can build webbish like front end which is decoupled is rather fine stuff that Microsoft has jumped on. And voila, you'll see that this thing will drive new windows things like Metro on cell phones and Windows 8. It smells strongly to be in that direction. But I will recommend to dwell a bit into XAML, and if MSDN is dry and boring place to read about it (as on):

http://msdn.microsoft.com/en-us/library/ms752059.aspx

then you could have some entertainment and watch this 4 year old and mostly undernoticed video about Vista... it was not Vista!!!! it was about Windows Presentation Foundation!!!

http://www.youtube.com/watch?v=MTfM5pmUrnU

Hope I have got your attention.

Wednesday, May 25, 2011

Mobile web

I am contemplating how to adopt a web site to be more suitable for the mobile phones. I have stepped on a set of solutions that may provide an answer to this question and cover more than one phone type.

http://mashable.com/2010/08/11/cross-platform-mobile-development-tools/

Writing application for each phone seems a bit tedious business. I guess that producers will hit the wall of cross compatibility. It is cool to have a native app for your phone, but multi-phone development is costly, and maintenance of several lines of mutually exclusive phone os-es applications even more. Thus I guess we will go to a deadend with specific apps (except for games and system utilities for each phone). Already top 10 apps on iPhone are games - I've seen nothing serious.

Sunday, May 22, 2011

Cloud

As every IT hype in the past couple of decades it goes in the same fashion. Someone yells some buzz, then everyone buzz the buzz, and then some catastrophic event spins the buzz....

What I have heard in last years - virtualization, virtualization, cluster, cluster, cloud, cloud, cloud, cloud, cloud, cloud.

While you try to explain that you need to backup, your manager hits you with the $$$ speech. And it goes then they fork $$$ more than they saved $$$ before, to do the remedy.

It is hard to keep repeating: there is no silver bullet solution! You cannot shoot a problem with one solution. But that part hardly gets understood.

http://www.bbc.co.uk/news/business-13451990

Wednesday, May 18, 2011

Going, not going...

Past several days have been switching and resting. Little bit of graphical design fiddling with HTML divs and trying to make something working. Found that divs are very hard to control if one is working in percentage world. Now I understand designers why they go to fixed pixels. HTML is not easy to control. At the end I needed to combine TABLE and DIV approach to align things and I am still not satisfied with the result. It could come as crazy statement but HTML/CSS is not covering "floating" layouts easily - a lot of tricks.

When I get saturated with HTML design, then I switch to PHP. Kohana is coming good. Just controller/view system is doing great job. Make template, make control, populate template, do some HTML design. In iterations.

When I get tired, I get out of the circle, read articles, email, messages... and along the way I have stepped on a HTML/JavaScript that may surprise you - whole linux in a browser "terminal" window. Furthermore it turns out that this person  Fabrice Bellard is making a whole simulation of the Terminal and 80x06 and Linux on top in JavaScript! For me this is amazing! A unix/processor emulator within the browser. Try it for yourself: http://bellard.org/jslinux/ Note that you need at least Firefox 4 or Chrome 11 (not the latest Chrome 12). Script will tell you if it is going to work in your browser. This makes my day. There are things worth making.

Another thing I have stepped on is purely mathematical X^4+X^2=1. It says 85% of people cannot solve this. After all this programming, I also found out that I completely forgot some algebraic transformations. Yes I can solve this by using computers - what a waste of CPU cycles, but that would be beside the point. 

Tuesday, May 10, 2011

Where I'm heading?

PHP I personally find a very balanced solution for writing web site automation. Quick enough, can be scaled, is not dependant of platform, browser neutral, well documented, easy to use... I find this as benefit. Of course some will toss in its OO approach, extensive libraries and a lot of third party know-how. Nice.

It is not my favorite though from the aspect of the language - I am fan of ruby and C++, and reasoning behind this is currently out of scope for this writeup. I wanted something else here.

PHP have very nice OO system, simple, effective, just enough not to get into the way and just enough that you can "organize" concept in chunks of convenience.

How do I jump on writing a "large" application in PHP?

I can make libraries myself, use a lot of PEAR stuff to do side-work but this requires analysis of the whole system. This is time consuming. You can't write large library of things overnight.

As Internet user I step on common sites like Facebook and Twitter, news sites, shopping sites, banking sites, repositories, personal views (like this one I am writing).

All of them are some sort of an application. Many of them possibly written from scratch as PHP was once upon a time a "form" processor. Yes I have used it very very early :)

If you wish to build a web site, that is nothing easier today. Start simply by creating a blog. Couple of clicks here, couple of configurations there and hey! there is decent web site.

If you wish to go deeper there is plethora of ready-made software for various purpose - wanna discuss - internet forums - wanna publish/edit web site - a number of cms-es. Wanna imitate facebook success and have something in between discussion and publishing - hey there is social network softwares.

Many things on the web come nowadays as SaaS. Which is great concept - people who make software make it at one place and people who use it pay some rent to use it.

But how to write your own application by not "twisting" cms'es?

Not that I find this approach wrong, on the contrary - twisting cms-es is great method to make your web site and possibly automate it with some plug-in here and there. It really depends on a need.

So after many talks with friend here and there, I got a suggestion: Prado framework. Quick glimpse over its functionality and you realize this is large animal to chew on. But somewhere on the road I also got hinted to Yii as being "successor" of Prado. Looked fresh and more inviting.

Spend days trying to understand nuts and bolts of it. Acquired a book. Hmmm.

After a lot of clicks and trial and error i managed to make something.

It turns out not to be too complicated. But I had some sort of not being really happy with it. Yii (and I presume Prado) are absolutely great to write web application - for example - you want to write a ledger application.... You develop database model and Yii helps you to make code that runs about it. This is great but not exactly what I am looking for. I want to make large application that is web site too. Second thing is that Yii is several tenths of megabytes of upload. This is less of a problem because you need to upload library only once to a target web server and then you changes/uploads are relatively minor.

Still I wanted some flexibility, something that balances structure and help and from another side offers me more openness.... to be what I want it to be.

So i went to research PHP frameworks a bit more. There are some resources on the net that compare them. Which is not very useful not even mentioning all of them. But after some time I stepped on something smaller than Yii - Kohana. Again - couple of days to understand what is going on in there. But some comparisons emerge from the beginning. Kohana is much smaller than Yii (ad hoc about 5 times smaller) - not too large to upload. It defines structure but do not impose design. You can write whatever you want from scratch. Do not take me wrong - with Yii you can do the same, it has "themes" as for customization, but Kohana opens me a flexibility needed to build how I want it to be.

Now to my knowing and investigation Kohana is "new kid on the block", it still lacks a lot of documentation and experience of third kind, but looks to me promising. I am of adventurous kind, and possibly if I am more "strict" I would possibly contemplate Code Igniter as being longer around.

The choice has not been made yet. I first want to 'understand' what all these framework want to solve and offer and then choose one that I find most suitable.

On a track side there are some thoughts. But they do belong to another section of this blog.




Sunday, February 13, 2011

Okay

Let's C where am I...... First, I am on Mac OS X (macosx) so many choices are based on decision shall something will run on what I have.

I got the idea about Eclipse... a particular one Eclipse for PHP. Okay.

This is the story: I want to write some complex project in PHP. I can do it with good ascii editor, since I am on Mac, barebones is my choice of text edit tool, barebones have been market leader for ascii and mac for years, to my knowing (if you know something better, let me know). No means for full fledged barebones,  so excellent free version for now. Recommended.

Writing php code goes in development circles. Type, save, switch to browser, hope it works, go back edit, save... I do not mind that mantra - it is everyday's programmers prayer. Yet, it would be helpful if there is some easier way. Hop, jumps in friend of mine that spends his days in Java and says "Eclipse!". I say, OOOOkay but I am not Java, and he says "but Eclipse is not only for Java".

Then it starts.....

Got eclipse for PHP. Gosh.... took me about 2-3 days to get myself familiar with it. I admit. Not easy. And I am not new to RAD/IDE's seen many in many years. But, after some wrestling with Eclipse, I got an idea how to make it work with XAMPP. Not very logical solution for me, but it works.

Strange animal Eclipse for PHP.

Now. If you just get an eclipse for php on its own you may find yourself puzzling how to make it to "debug" the code as it nicely allows to "edit" code and "run" it (although even this "run" is a bit awkward since the only browser it "recognizes" is Mozilla and "internal" browser. Wander why.

I am fond of some other browser namely Camino and Chrome (shall I link it? no.... - google it). However Eclipse gives up on finding these two in "production". 

Second thing that puzzles me with EfP (Eclipse for PHP) is that there is no "deployment" i would expect. Okay PHP is not "compiled" so "build" is a bit awkward to contemplate yet it would be logical to be a "copy" to a web server "build" folder. Wander why this is not done in this way. Only way I made it work is to use "source" directly from web servers folders (see above XAMPP - it makes "local" web server).  Okay it could be because you may be confused with double sources in two different places but still it is logical for me to have "source" and "build" and then remote "deployment".

Third thing that have caught interest in along the research about PHP tools, is CVS systems, not that I need to share code but out of curiosity.... By researching some pointers I stepped on PHPunit that propose to be used to "test" PHP code. From one side PHP comes with PEAR which is in my view an extendable "class library" - extremely nice thing from PHP makers and contributors - many useful tools!

So I have found git and github since it seems to be place of choice for PHPunit.

Took me several hours to configure git.... Luckilly i've been on UNIXes for years.... surely not mac staff. On the way I found a problem that I need "root" access for Mac (which is disabled) and found excellent hint on Mac OS X Hints

GitX is still puzzling me as to be proposed "easy" git interface (in which I do not find myself around except to browse what I managed to do with git on a command line) Nice tool but still poorly documented. Maybe by the time it would develop into something more useful than kind-a viewer (as I see it).

Retracing from "git"-ting i found that Eclipse uses SVN. Okay will try to do it later sometimes.

Gone back to Eclipse. This time debugger.... Eh. Seems that there are some two ways to make it work. One of ways is to have Zend Engine.

Zend being commercial, is kind to have a "community" edition. And there is version of Eclipse bound (as far as I understand) with Zend and its called PDT

That did not click with XAMPP i am using. So I have grabbed Zend Server separately in order to be able to debug.

It took me a while to understand how Zend was supposed to work. Which is much worse, Zend tends to "live" out of MacOSX file tree and gets installed in "Darwin" UNIX places (which makes tedious other things).

I also grabbed "bound" version but it turned out to be older than latest Eclipse for PHP.

So another hurdle with setting Eclipse to work with Zend Server.... and found out that it does not like Apache "URL rewriting" systems. Whenever you find yourself between several producers - apache, php, zend, eclipse... it starts to feel like "bermuda triangle" lot of resources - do this with this, do that with that.... pretty tedious to find your way around. So it comes handy years of hacking httpd.conf (as to change default users so I can edit files from MacOSX) and other UNIX skills. Zend Controller that comes with Zend Server is maximally puzzling application (did not find what it is for as yet).

But I managed to make it working .... 

Result:

XAMPP working on standard web ports
Zend Server working on ports 10000+
Eclipse debugging PHP code as PHP script and as WEB script...
Two workspaces - one for XAMPP one for Zend.
now I am set to explore some PHP code.....

And so it goes on my GitHub https://github.com/ljgww