Claudiu Persoiu

Blog-ul lui Claudiu Persoiu


Archive for the ‘Diverse’ Category

How I use Magento2 on my local with Docker and Docker Compose

without comments

Disclaimer

Please note that this solution is tailored specifically for my needs and, while your needs may vary, don’t worry, everything is on GitHub, so feel free to take what you need.

I would like to add that this is not a “you’ve been using Docker with Magento2 wrong, this is how it’s done” kind of blog, I just want to share what I’m using and how. It may not be the best fit for you, but maybe you will find something useful.

Intro

For almost 2 years I’ve been using Magento2 in Docker containers. I’ve been doing that before, but I must admit that it was because I had to, not because I’ve seen the light, I mean advantages.

As you may know Magento2 is not exactly a small and light app, it’s quite heavy on the resources, especially during development.

Compared to a VM, with Docker you get:

  • Speed: I think the speed is one of the biggest advantages, you can stop and start containers very fast, only the first build will take time, after that it will be very fast;
  • Light on resources: Compared to a VM, the container does not need to include the entire operating system, so it will not take a lot of space on disk and will not use a lot of processing power, because it’s not an entire OS doing… well… OS stuff, it’s just a server most of the time.

What you don’t get:

  • Learning curve: if you don’t know Docker and Docker Compose, it will be less intuitive at first;
  • First setup: harder to setup at first, if you have been using a VM for a long time, you will feel that you are going against the tide, but I assure you, in the long term it will be a lot simpler this way.

Taking the above into consideration, I would like to say that when I’ve started with this setup I was using Linux with 8G of RAM. One of my colleagues even wished me good luck on installing Magento2 on a ultraportable 8Gb RAM system. He wasn’t even sarcastic, more like pitying me for my bad workstation selection.

One of the requirements was that I needed some isolation and configuration between projects, I couldn’t just install a server and be done with it.

Previously I’ve been using Vagrant and VirtualBox, a great fit, very easy to use (most of the time). However, for Magento2 I’ve realised that it was heavy enough on its own, it was making me run out of resources fast.

Also, I wanted it to be easy to use, I don’t like to have to remember and type out a 3 word command, I just want to press some tabs and get it over with.

The requirements

There were some specific requirements:

  • nginx config – should work out of the box, Magento configuration isn’t very small, I wanted to make use of it with ease;
  • SSL – the domain has to also work with HTTPS, mostly because some APIs require it, the certificates don’t need to be valid;
  • bash – the Magento command should work as the system user, not as root (as containers usually do). This is required, because I don’t want the files generated by Magento to be generated as root (and therefore only removable with root rights);
  • xdebug – must work out of the box and be easily integrated with an IDE.

The implementation and usage

Magento2 offered a Docker container to work with. I will not say anything about it, since it wasn’t at all something I needed.

My main source of inspiration was: https://github.com/markoshust/docker-magento. The project changed a lot since I’ve started, so I definitely think you should check it out.

The starter point is: https://github.com/claudiu-persoiu/magento2-docker-compose

The relevant files are:

  • magento2 – it should contain a folder html with the project
  • dkc_short – it can reside anywhere, but it should be added to the files ~/.bash_profile or ~/.bashrc, this file contains shortcuts, it’s not necessary, but I like it because it make my life easier;
  • docker-compose.yml – it contains all the mappings and relevant containers.

NOTE: I think I should point out that the commands on the PHP container run in two ways, as the system user or as root. This is a limitation of the Linux implementation, please make a note of it, as I will refer to it later.

Step 1:

What you should do when starting a new project with an existing Magento2 repository:

$ git clone https://github.com/claudiu-persoiu/magento2-docker-compose.git project_name
$ cd project_name
$ git clone your_own_magento2_repository magento2/html

Step 2 (optional):

Copy the shortcuts to your bash console:

$ cp dkc_short ~/
$ echo ~/dkc_short >> ~/.bash_profile
$ source ~/.bash_profile

NOTE: If you don’t have the file ~/.bash_profile on your computer, just use ~/.bashrc

Step 3:

Start the setup:

$ dkc-up -d

It will take a bit of time the first time, but it will be a lot faster next time you run it.

Step 4:

Run composer install:

$ dkc-php-run composer install

That’s about it.

What is this dkc stuff?

Well, I like to use tabs when running a command, so I added some aliases that allow me to run a Magento command without typing everything, I just type dkc[tab]p[tab]-[tab] and the command. I just love bash autocomplete.

The command list is very simple:

  • dkc-up -d – start the containers in the background
  • dkc-down – stop all containers
  • dkc-mag [command] – run a Magento2 command
  • dkc-clean – clear the cache
  • dkc-php-run – run a bash command inside the php container, like composer in the previous example. NOTE: This command is running as the system user, not as root.
  • dkc-exec phpfpm [command] – this is same as above, but running as root. You should almost always use the command above.
  • dkc-exec [container] [command] – this command needs a bit more explanation:
    • container can be:
      • app – for Nginx server,
      • phpfrm – for php container,
      • db – for database,
      • cache or fpc – for cache containers;
  • the command can be anything that applies to that container, like “bash” or “bash composer”, etc.

I know the commands seem like “one more thing to learn”, but most of the time you will only use the first 4 commands.

How does the magic work?

Well, to see what the above commands translate to, just check the “dkc_short” file.

There are only 2 other interesting repositories:

The repositories are pretty small and not very hard to understand.

If you need to modify anything, just feel free to fork the repositories.

The conclusion

That’s about all you need to know about it, I’ve been using this setup for almost 2 years.

For me, it’s working as a charm and I was able to use Magento2 on ultraportable laptop with 8Gb RAM without any issues.

The (happy) end!

Written by Claudiu Persoiu

29 November 2018 at 3:00 PM

About passion, programming and heating systems

without comments

Don’t be fooled, this post is about programming, system architecture but mostly about using a heating system.

If you don’t know how can you talk about programming without programming you should check out the “The Passionate Programmer” book by Chad Fowler, a great read. The Jazz stories from this book inspired me to write this blog.

The story begins with a new apartment in an old building. Or at least it’s new to me.

The building has its own heating system, very old and extremely inefficient. After a long consideration I’ve decided that it was time to install my own heating system and disconnect from the main building one.

So far, nothing interesting, there are many people that do this, partly because of the added comfort and partly to optimize expenses.

With this being said, I had a project and needed a developer. Or in other words, I had a heating system to build and I was in need of somebody to do it.

I’ve asked around for that “good” developer.

Like in anything else, there are a lot of people that come up with bad solutions. There are devs that make great offers but are unable to finish the project, or they write very bad code that is not scalable and even worst, unmaintainable.

Since what I know about heating systems can be covered by anyone with the patience to google the subject for a couple of hours or so, I wanted somebody I could trust, so I was looking for the passionate kind of developer!

I had a couple of recommendations. The first one told me that he had to put all the pipes close to the ceiling. After convincing him that I don’t want my house to look like a factory full of pipes he said that he will definitely need to replace one of the radiators (at least) because he could not fit a pipe behind it. I could fit my palm behind that radiator, with this in mind I knew I wanted somebody that could fit a pipe behind my radiator.

It was clear that he wasn’t a good developer. A good developer must work with the requirements, the very least a project should be able to respect most of the client requirements, if it doesn’t, there can be several explanations: he can’t because he doesn’t know how or he doesn’t want because he knows it’s hard and doesn’t want to go that extra mile. In some cases that’s not a tragedy, maybe it will be cheaper and faster, and in his case it was. Unfortunately for him, I aimed for quality.

Then there was the passionate developer. He never mentioned anything about not being able to do something, it was always a cost and maybe a consequence. The deal with better developers is that they are more expensive and everything about them is expensive, they will want better servers for hosting, better tools and sometimes more time for things like testing and maintenance. In other words, sometimes the cost is bigger not just then, but also in the log run. A quality project takes time and money.

This is my resulting project:

If you never seen an apartment heating system before you should know that except for the pipes, nothing else is actually required.

It’s all just passion!

For instance: the pump on the lower right, it’s there just to force the water to move faster in the system. Think of it as Redis, it will have a good effect on your system but most systems will happily work without it. Of course, at some point there may be maintenance for that pump and can even result in issues, like this Magento 2 issue: https://github.com/magento/magento2/issues/10002. Every system has its own cost.

The expansion tank in the lower left was unnecessary (in the sense that the system already has one built-in), but it’s not a bad idea to have an extra. Think of it as that extra storage space, ram or CPU that you don’t actually use. Your server should never go above certain server loads, that’s the expansion tank you should take into consideration.

The water intake filter is like your firewall, you need it, it’s your protection, maybe most of the time will be useless but when there will be issues, then you will be glad you have it, because he will have filtered them out.

The good thing with passionate developers is that other developers understand and appreciate their work. That is very important, no matter the industry of the “developer”.

The only one that had anything to comment on the system was the ISCIR certified technician that initialized the heating system (ISCIR in Romania is a special authorization needed for this exact thing). You can tell that he wasn’t passionate, he just wanted to say something bad about it because he wanted to make a good impression on me.

Unfortunately for him, he made some very stupid comments and then he made me a maintenance offer. This guy was the consultant, he didn’t do the project and he doesn’t want to work on it but he definitely wants to make some money on it without actually doing anything.

I guess the conclusion is that no matter the developer, the quality and passion transcends the industry.

Written by Claudiu Persoiu

8 August 2018 at 8:47 PM

Posted in Diverse,Web stuff

Tagged with

Guide to motivating programmers OR How to provide coders with a real challenge

without comments

motivationIT is probably one of the most dynamic fields in the job market and people are a very important yet limited resource.

And yet people come and go quite often, and most of them are complaining about the lack of motivation.

This problem will end now with this simple guide for motivating programmers and not only them!

Programmers need challenging problems, they keep saying all the time that they need more challenges, don’t they?

Give your coder a true challenge! Make him get specifications from a client that doesn’t know what he wants, let him struggle, you could even try leaving him do this by himself, let him feel the adrenaline of a true challenge!

It must be noted that a programmer is nothing more than a repressed Project Manager, give him a chance to express!

However, you should not stop with that, because there is no greater challenge than to work on multiple assignments at the same time. A good idea for raising complexity is to offer him the chance to work on multiple projects in parallel. Give him the opportunity to have his mind busy with different things, diversity is always good, isn’t it?

A little secret for exploring diversity at its fullest is for him to have different roles on different projects, maybe have him alternate a project that requires management with one that requires maintenance. It’s a shame to not have enough diversity!

Is he writing a lot of code? You have to do something about it! When a programmer is focused working on something, keep in mind that he’s actually desperately crying for attention. You have to do something to break this vicious circle, it’s your duty as a manager to save him!

You have to find a way to interrupt him: try with a few meeting, they always help. If he is looking eager to get out of a meeting, it’s just a sign that he wants to get into the next one!

In time, you’ll see that the better a developer is at writing code, the more he’ll wish not to have time for it anymore. However, he’s not going to tell you this, or, even if he does, it’s because he really doesn’t know what he truly desires.

And eventually, if he likes to write code so much, maybe you should take it to the next level and get him to test it on his own. After all, if he wrote it, who would know better how to test it?
There is one more thing to mention in the context of a challenge. When a programmer is coming to an interview, he will always say “I want to learn new things”. How do you apply in real life this desire? Simple, you have to make him work on something that he doesn’t know anything about! This way you will present him with something that’s at the same time new and challenging. Is he a PHP programmer? Good for him, now give him a Java project! Is he a Java programmer? Nothing could be simpler, give him something to do in Objective-C! Maybe sometimes it will be hard to find new technologies the are completely unfamiliar to him, but a programmer’s happiness is not an easy thing to obtain!

Try not to fall in the trap of offering salaries that are correlated with the position he applied for. Don’t worry, the salary is confidential, nobody talks about it. Especially not when he recommends a friend, he will definitely not inquire about the salary that was offered to said friend, if confidential. It would be a lack of professional ethics to try to find out, you really don’t have to worry about it.

And speaking of interviews, maybe you think that hiring processes should lead to meaningful results and qualified candidates. You couldn’t be more wrong, because what do you truly need? Like I’ve said before: Diversity! Not long ago I’ve read an article about some chinese companies hiring beautiful women to make the work environment more enjoyable and stimulating. You have to always find ways to integrate the new tendencies, and if the only open positions that you have are for technical jobs, you have to work with what you have. Maybe you think hiring based on looks can be problematic sometimes, especially when the jobs are technical. In this cases you have to realise that motivation has to be designed at a large scale. Yes, maybe some teams will require more time to adapt to this kind of new team members, however if that person has done something worth mentioning in any way, it means you’ve done a great job!

Let’s not forget about trainings and conferences. When did you last talk with a programmer saying that he doesn’t want to go to trainings or specialised conferences?

Motivation has to be maintained like any other desire. There are two components to it: wishing for something, and not least, not getting the something that is desired. If you wish for something it’s because you don’t have it yet, right?

If you didn’t already understand, the solution is simple: don’t let him have the something that he wants, so that he will be perpetually motivated to work hard in order to get it. He wants a training? Organise the training then make sure you are sending there the persons that are the least interested in it. He will see that he has a chance, but it wasn’t his turn right now.

Maybe this will sometimes be a challenge for management, but with a lot of carefulness it can be made possible! Keep the desire alive!

Another advice in regards to trainings: to keep the desire alive it is useful to send him to trainings in which he isn’t interested, but in which somebody else is interested. This way you will always have employees interested in trainings and having trainings, and also motivated!

When he is working he shouldn’t be able to see the usefulness of his work, it is very important. If he will see it, how can he be motivated still? It’s like climbing a mountain, no climber is motivated to go on if he knows how high he already is. You must be careful not to let him know where he is standing: keep those statistics and progress reports well hidden, because if he gets to have a feeling of ending, of target reached, of goal achieved, how would it be a true challenge then?

And don’t forget to not show him trust, he must build it for himself. You should provide him with a target and then keep it just a target. Indeed, a target achieved provokes pleasure and the satisfaction of a job well done, but is that what you want to show? Think about it, each time you congratulate him for his work will he be more motivated? Why try to stimulate him to improve when you can stimulate him to reach a target that he can’t. Don’t show him you trust him, let him struggle, let him feel the challenge.

In Romania we have a saying: “the known road is the shortest”. Regardless, some try to automate rudimentary tasks. Basically they are trying to eliminate the known road. Actually, if you prevent him from automating processes you are helping him remain busy, to have a busy mind, and a busy mind is an active mind!

And, secondly, with this approach you are helping him maintain his work place. Maybe he doesn’t realise it, but he will lose his purpose when he will remove exactly the tasks which, eventually, he knew so well, because he made them so many times… Programmer or not, he mustn’t be replaced by a robot!

Thirdly, it’s the satisfaction you get of walking the known road – don’t let him divert from it, because, it’s so well known that it should be finished quickly enough.

And never forget that you must teach him the importance of management. He must see that you can help him, that you are the key to his success and happiness. To show this it is very important to trust yourself. Try to organise a party and don’t invite him. Nothing says more “I could’ve been there” than not being there.

Another way is to organise a business trip in an exotic location. Don’t worry, it’s not important to actually have something to do there. While you’re there, don’t forget to have fun, it is very important for him to know that you’re enjoying yourself. When it gets though, you have to remember that you’re not doing this for you, you are doing your best to have fun for his and his imagination’s benefit!

Maybe some suggestions will not work for everybody, but you have to combine as many of them as possible to have a real success and keep your programmers truly motivated!

Don’t try to identify this utopian world, because any resemblance with the daily reality is purely coincidental.

Written by Claudiu Persoiu

4 April 2016 at 9:39 PM

Posted in Diverse

Tagged with ,

Nope PHP 6 is not here… but how about 2013?

without comments

This is a retrospective of the year that has just ended.

In case anybody is still wandering, no, PHP 6 didn’t come out and it will probably not come out any time soon.

Why is it relevant? Since I started this blog, at the end of each year I had a post related to PHP 6 and the fact that it wasn’t released. In 2008 it was a popular question, but nobody is wondering  about that anymore, and so I will close this subject now. Let’s return to the year that has just ended.

Close to the middle of the year, the version PHP 5.5 was released, bringing features like: finally , generators and many other enhancements.

Like in 5.4, these are not defining features for the language. In this new version, there are functionalities that can be easily replaced, but if present, they are welcome.

Even though PHP is proving very dynamic lately, I think this year the main keywords were HTML5 and JavaScript.

HTML5 is seeing a lot of improvements and older components begin to have more momentum. The companies are beginning to invest in games that work in the browser using WebGL. Even older games are getting ported to the platform, using technologies like asm.js.

And, because I’ve brought games into the subject, it seems very interesting to me how only 5-7 years ago the games built with JavaScript were relatively simplistic, and now they can be compared with the ones from PCs and consoles.

I think the web revolution, which many were expecting, is taking shape. Finally the Web is a platform in the true meaning and JavaScript a language truly appreciated.

The success is due to all sides, it is not only about ECMA or only about browser manufactures, now it is truly dynamic. The Web revolution is in full blow!

When it comes to backend, the spotlight was on Node.js. It is becoming an important player on the market. New frameworks have appeared  and it isn’t a platform mainly used by hackers eager to explore new technologies anymore, but also by large companies, like PayPal, LinkedIn and Yahoo, adding a vote of confidence to it. I think Node.js is finding its place and a niche in the market, and, as a JavaScript fan, I can only be happy.

An advantage of Node.js is that you don’t have to take into consideration different JavaScript versions, like in the browser. It allows the use of the latest features from ECMA freely, an environment where you can develop JavaScript with not headaches.

Technically speaking, it was a very interesting year for web development.

Finally, I want to wish you all an extraordinary 2014!

Written by Claudiu Persoiu

19 January 2014 at 11:10 PM

Posted in Diverse

Tagged with , , ,

The epic code from the movies

without comments

In movies where hackers appear, source code appears flowing in rivers on the screen. Looks important, seems like there is a computer genius that is preparing to revolutionaries something.

Ever wandered what that epic code from the movie is? John Graham-Cumming has done a collection of movies and the source code used in them: http://moviecode.tumblr.com/.

Written by Claudiu Persoiu

5 January 2014 at 12:07 PM

Posted in Diverse

Building a new generation of programmers in a consumers society

without comments

Motivated by Rober Martin’s article, Hoards Of Novices, I’ve decided to write an article on a similar subject.

I do not want to write about the need for employers to hire juniors, but about why these juniors are not up to the expectations and, in the end, what can be done to be better prepared.

The software market is continuously expanding. Software is the way we command a computer what to do. Today, devices around us have processors, software and applications, from phones, watches, TVs and up to washing machines and refrigerators. All these devices need programms and programmers to develop applications for them.

With this premises, we reach the Software crisis. It was concluded that we need to build software faster in order to solve this crisis. This was a popular subject in the ’60s, but in time it has become less important.

To solve this problem, high level languages and frameworks were built. High level languages made development and maintenance of an application much easier. This way, programmers are getting very far from the “metal” of the actual hardware, working with concepts much easier to deal with.

In a world of high level languages (Java, C#, PHP, Python, JavaScript etc.) it is much easier and faster to create an application.

Yet, although developing an application is becoming easier, the quality of the developers is falling.

A consumer society

We need school for a better job.

Because the need for studies is a general need, the school itself is diluting. The educational principles haven’t had significant changes since education became available to everybody. The result of the learning process is the exam, in order to determine the level of knowledge. And even more, a mediocre result allows us to move forward, without prove that the required base is present.

Moving to the next level is done with a partial evaluation, you don’t have to know 100% of the information, just 50-60%. It is not exactly clear if there are important notions in the remaining 40-50%.

This educational problem is more or less a general problem and there are few those who try different approaches.

In general, I don’t consider school a defining system for determining the knowledge, especially today, when we have access to such a large volume of alternatives for it.

When students finish school, they don’t have all the required knowledge to actually work in the industry, which is not abnormal. School must offer a general basis. For instance, during my higher education I can remember at least 8-9 programming languages that we studied. There were actually more, but I didn’t keep a detailed evidence of them. It is clear that you can’t possibly know all these programming languages in order to become productive using them. On the other hand, you have an idea on how to approach them, which may help you to find the one you’ll like to study in thoroughness.

That’s the key, to study in thoroughness! For this we each have our approach, here you can find your own way, either courses, books, practical projects or all of them. By thoroughly studying a subject, the employers will not only accept you, but they will hunt you!

Often, the passion will totally replace the studies from school. I’ve met a lot of people which, even though they haven’t studied informatics in school, they are now professionals in it.

The good part is that a lot of people are studying from pleasure and I advise anyone who is reading these lines to search for pleasure in what they do. This is the best motivation.

Alternative education in a consumer society

Because the traditional learning techniques are no exactly sufficient, let’s talk about a few alternative methods:

  • books
  • courses
  • tutorials
  • articles/blogs

Books

Traditionally books are the best source of information (at least until the Internet became available). But there is no guaranty for the quality!

About 8-9 years ago I was trying to buy a JavaScript book. The selection wasn’t very big and so I tried to analyze each one.

In the end I was disappointed with my choice, because instead of teaching me JavaScript, the book was teaching how to make special effects on the page (very popular in that period).

In my particular case, I found the answer much later in a presentation by Douglas Crockford. He said that most JavaScript books are like that and he was recommending a single book, beside the book written by him, JavaScript: The Definitive Guide.

The reason is very simple, people tend to be more drawn by books that promise to teach a language or technology in a limited number of lessons or days. We want everything now, but studying takes time, you must understand the notions, not just a fast overview.

Generally, to determine the quality of a book you should look for reviews. These days it is very easy, I prefer Amazon.com and not only. This way you can determine if it is what you are looking for.

Sometimes a faster approach is useful, especially if you don’t have any previous experience on the subject, but generally this doesn’t offer a general perspective, only a gentile introduction.

Courses

There are a lot of courses, both in-class and on-line. Just like for the books, it is hard to determine the quality of the course.

Courses promise a lot, but a lot of the times they don’t treat the subjects in detail and in the end, even though you have the impression that you have learned a lot, when it comes to practice you realize that any variation from the course material is very difficult.

Just like for books, references are very important! Unfortunately, there aren’t as many reviews for course as there are for books.

Try to see what subjects the course is teaching and the detail of the approach. Sometimes, you can find more easily a reference for the teacher than for the course.

Tutorials

Especially on the Internet, there are a lot of tutorials that promise to teach a certain domain, but they only teach you how to create their example. In the end you can only create small variations of the initial example. Often, the creator of the tutorial has the best intentions, but it is hard to transfer information like this.

For the free ones it is very easy to determine if the approach is the right one for you and for your needs. Try to watch a few episodes and in the end see how much you’ve understood on how that particular component is working. If you can only replicate, maybe you need to search a little more.

The good part is that there are generally a lot of them to choose from. For instance, for a programming language you can first check the official reference to see what you should learn about, then in the tutorial you can see how many of the points from the reference were approached.

For the commercial ones it is a bit harder, because often you just have a small introspective preview, insufficient to form an opinion. For those particular cases you should search for reviews.

Blogs and articles

The good part here is that the time investment is relatively small. It is simpler to get a general idea.

The disadvantage is that some of the articles don’t update with time. You must make sure that the examples work on the version that you are using. From my own experience I can say that keeping an article up to date is hard an takes a lot of time. For instance some of the articles on this blog that still attract visitors are written a few years back and if I don’t use that particular technology anymore, I’m tempted not to keep them up to date.

How to learn better

Search for references and reviews for the materials that will require an investment in time and/or money: books, courses or tutorials.

When you’ve settled on a subject, try to see what materials others recommend. The Internet is full of materials of different levels of difficulty.

When you fell that you’ve mastered a subject, test your knowledge. Build an app, follow the subject on Q/A platforms or even write a tutorial for the others. You tend to understand much better a subject when you have to describe it to others.

Practice! It is very important to practice what you learn or you’ll forget much easier than you think. Contribute to open-source projects, try to do personal projects or try to adapt projects created by somebody else to your needs. Github is a very good tool for finding and publishing projects.

It is a bit harder at the beginning to understand somebody else’s code, but in the industry it is mandatory in order to be able to collaborate with others.

Learn new things all the time. Technology is changing, and so is the perspective over it. For instance, AJAX appeared in the late “90’s, but the perspective over it and how it can be used changed dramatically over the next few years, even though the technology itself didn’t change a lot during that time. The same for JavaScript, even though it appeared in the “90’s, only after 2000 it began to be considered an useful tool, previously it was mainly used for special effects on the page.

For a while, PHP was considered useful only for small projects. Today it is the language of choice for giants of the internet, like Facebook and Yahoo!. Along with the popularity, the best practices on the language itself changed for a better scalability and performance.

Conclusion

The educational system doesn’t offer the performance that employers are looking for. This creates a discrepancy between the expectations of the employers and those of the graduates, and this not restricted to informatics.

Unfortunately, the alternative materials sometimes also promise unrealistic things. Some study technologies and programming languages for months, while others promise results after only days or even hours.

Fortunately, we are living in an era dominated by information, and we can find not only materials, but also opinions about them.

Through better training, the changes of finding a job are rising considerably, resulting in satisfaction on both sides.

Written by Claudiu Persoiu

17 December 2013 at 11:18 PM

Posted in Diverse

There is life without PHP 6 – 2012 retrospective

with 3 comments

Another year has passed without native unicode support for PHP. Yes, PHP6 is not here yet, in case anybody was still asking…

But, the version that is now here is PHP 5.4. With this version only refinements were added, there weren’t changes as big as there were on PHP 5.3. In PHP 5.4, the big addition are “traits” and, my favorite, the new version for closure.

As the keywords for last year were Drupal and Magento, this year the keyword was only Magento.

A couple of months ago, more or less forced by the circumstances, I’ve taken the Magento Plus certification exam. For this certification, Optaros, my employer, had a major influence. We had been more or less made to take the exam and we also had to be part of a company level study group.

I haven’t been part of a study group since faculty, and I must admit that I’ve forgotten how useful it is. Colleagues with more Magento experience (unlike me who I’ve been working with Magento for a little more than an year), had helped a lot to clarify issues and to document them.

But more about this in another blog, that will follow shortly (I hope)…

Anyway, after studying Magento in so much detail, I must admit that I have a lot more respect for the platform. After you analyze the backend architecture, a different picture is emerging. The architecture is very interesting and quite flexible, which makes you overlook some of it’s shortcomings.

Now that a new year has begun, I wish I’m going to publish more, I think in the last period I haven’t been very “productive” when it comes to publishing, either text or code.

Also this year I want to take at least another certification exam. As the Magento certification was set only for this year, I still have a lot of options on my plate.

That’s about all for 2012 and plans for 2013.

I wish you an excellent 2013!

Written by Claudiu Persoiu

14 January 2013 at 9:54 AM

Posted in Diverse,PHP

Tagged with , ,

Auto Text To Speech

without comments

This is a small project for Microsoft Windows users!

It is a Text To Speech utility written in HTML and JavaScript. The application runs as a HTML Application.

I’ve written this application 3 times already, because I lost the first couple of versions. Finally I thought that maybe others can benefit from it.

For the Linux users one alternative is: eSpeak.

More details on the project page.

Written by Claudiu Persoiu

31 July 2012 at 7:17 PM

Posted in Diverse,JavaScript

Tagged with , , ,

My pink elePHPant in the room

without comments

happy elePHPants

My elePHPants family!

My elePHPants collection has just doubled, now I have 2!

I wanted an pink elePHPant, to keep company to my old elePHPant.

Also this time I’ve turned to eBay. A quick search found another elePHPants breeder, this time is: Herman J. Radtke III. This time I’ve ordered it directly from his site, without eBay, only because eBay would calculate the shipping fee wrong.

Even with the right shipping fee, the new elePHPant wasn’t exactly cheap:

$ RON
ElePHPant 16.16 55,51
Shipping to RO 16.95 58,23
Postal fee (customs) 0.6 1.95
Total: 33.71 115,69

Not exactly cheap taking into consideration that the price for an elePHPant is about 5 euros in bulk.

But now I have a happy elePHPant family!

Written by Claudiu Persoiu

17 April 2012 at 10:01 PM

Posted in Diverse,PHP

Tagged with ,

Another year has passed an PHP 6 remains a myth – 2011 in review

without comments

It became a tradition for me to begin my annual review on this subject.

PHP 6 is as close to be released as it was last year, or two years ago, which is without perspective. This year PHP 5.4 reached RC4 and a final version will probably be released soon, this means that work on PHP 6 will not be resumed soon. But more about PHP 5.4 with another occasion, is on my “TODO” list to see what got into RC4.

As the main keyword for me in PHP 5.3 were namespaces, Anonymous functions, closures and garbage collector, in PHP 5.4 it seems that those keywords are going to be traits, the new closures and scalar type hinting, next to many other new features.

When I’ve wrote my first annual review blog about PHP 6, I was mainly working on Romanian websites, hence my desire for a version that will natively support this language and any other without any changes. Back then I was mainly working directly with the language, without using a framework most of the time. But since then a lot of time has passed and many things have changed, now I’m using almost exclusively frameworks and other platforms that are taking me further away from the language, offering me a different architectural perspective.

After more then an year with NCH, I’ve decided that is time for a change. This is also a company from the states with a branch in Romania, and this time is Optaros. Although I wasn’t trying to change my work place, I’ve responded to an invitation to an interview, and long story short, I left. For a long time I’ve wanted to work again for external clients, after working at NCH where all the projects were internal, I’ve wanted a change.

Again the projects are even bigger, with other scalability issues. But I think that makes web development so interesting, the bigger the scalability issues, the bigger the project.

Last year the main keywords were Linux si Symfony framework. For this year that is just ending the main keywords probably were: Magento and Drupal.

After a short period of working with Magento, I can say that it seems incredible how a platform so big has so little documentation and a lot of the time so inconsistent. It is a very complex platform and a lot of things can be done with it, but when it comes to documentation, it seems like the usual approach is to just analyze the core. Coming from the Symfony world, where there are literary books for documentation, available for free, it seems incredible how little and disorganized is the Magento documentation. But this is also a subject for another blog. A think that the Optaros team played an important role in helping me understand how to approach the issues.

Another major event for me this year was the Yahoo! Open Hack Day, event that this year was also held in Romania. I don’t think I’ve ever seen so much enthusiasm and energy in a single place, in a single day. For me as a developer it was an unforgettable experience, one of those moments that remind me why I’ve chosen this profession.

Also this year I’ve passed my PHP 5.3 certification exam, at the beginning of the year. The exam wasn’t as difficult as I’ve expected, even though the tension remains the same. The fact that it wasn’t my first certification exam helped, it’s incredible how much you remember when you start the reading the documentation again. Last year I’ve decided that I have to take at least an certification exam every year, so I have to get started on preparing for the next one.

As a conclusion, 2011 was a good year, full of challenges and accomplishments, even though I haven’t checked a lot of entries on my last year’s resolution, I’ve done quite a few that were not on that list. But now is time for another new year’s resolution.

And now I wish you an 2012 full of achievements! Happy new year!

Written by Claudiu Persoiu

3 January 2012 at 4:45 PM

Posted in Diverse

Tagged with , , , ,