Udevi

This is the blog of the founder of the Udevi community. Here we'll talk about how to develop a big piece of software or a really small project, we'll have discussions with some great technologists in different domains: Java, .NET, Scala, and others as well. Follow the podcasts and the entries on the blog to find out some more stuff.

Wednesday, November 30, 2016

No Refunds
REFUNDS WILL NOT BE PROVIDED FOR ANY SERVICE. WE DO NOT PROVIDE CREDIT, REFUNDS, OR PRORATED BILLING FOR SERVICES THAT ARE CANCELLED MID-MONTH. In such a circumstance, you will continue to have access to your Service until the end of the monthly billing cycle. Please note that each circumstance is unique and election to make such an offer in one instance does not create the obligation to do so in another.

Monday, November 12, 2012

Whether you admit it or not, it doesn’t change the fact that the most frequent operation on our PC is in a way or another copy/paste. I copy and paste all the time: code snippets, files, links, you name it.

The problem with copy pasting is that it is one way ticket, you can’t go back and browse all your copy and paste history, search through it and find everything you copied or pasted.

Ditto is the tool that solves all your problem and it does that in such a way that you don’t even observe that it exists on your laptop or other devices. In short, Ditto is a clipboard manager that is managing all your copies and pastes, the number of occurrences it keeps in the SQLite database is configurable. I always have there a 1000. It is relatively good handled by the DB when you do searches, and it is a big enough number for keeping your most important recent copies and pastes.

I also like that it contains files and even tables from Excel or Word, that is pretty cool.

You call that by pressing Ctrl + ~

This way when you want to copy and paste multiple snippets of code, you don’t need to switch between the editors, just copy, copy, copy and than paste, paste, paste, and when you are not sure what you should paste use the search feature.

Friday, October 5, 2012

I can’t name myself a heavy Linux user developer, I don’t know by heart hundreds of commands, but recently I had to setup a hosting for NetBeans PHP Community Council. You can read my post about it at NetBeans PHP team blog. And I needed to setup cron to make my notifications in Drupal works.

So what is cron? Shortly cron is a time based job scheduler that allows you to run certain bash scripts in a certain frequency. What could we do with it? Well, a lot, think of email sending or verifying a certain flag in a web service, cleansing the database, you name it.

explaining cron configuration: CRONTAB

So cron has a configuration file: crontab, it describes the frequency at which the job runs and also the script that describes what will actually be done.

If you are in command line you can access crontab by typing

crontab -e

this will open the configuration file in your default Unix editor, usually vi.

FREQUENCY DESCRIPTION

Ok so how we describe frequency, there are 5 stars, which by default are placeholders. A star means ‘every’

*****

Ok so what all these start mean

* - minutes (from 0 to 59)

* – hours (from 0 to 23)

* – days of month (from 1 to 31)

* – month (from 1 to 12)

* – day of week (0 to 6)

So the previous example means

***** - every minute

****0 – every Sunday

*/5**** – every 5 minutes

45**** – every hour on 45th minute

15,45**** – every hour on 15th and 45th minute

***/15** – twice a month

I hope you got the idea. Also cron has some predefined values like @yearly, @monthly, @weekly, @daily and others.

CONFIGURE DRUPAL TO WORK WITH CRON

In Drupal we have different moving parts. One of these are notifications, which are very important and even more important in OpenAtrium, Drupal’s flavor. Notifications work with cron. To send all the notifications that are in the queue you can go to your Drupal site’s cron.php script, for example, at http://somedrupal.org/cron.php. At this point you’ll have in your administration panel, Administer –> Reports –> Recent logs, some entries related to cron script.

Now to make this script run at a certain frequency we’ll need to create a job for it. Drupal’s guide propose to make such an entry in your crontab:

CONFIGURE SHARED HOSTING TO WORK WITH CRON AnD WGET

On my shared hosting solution I hadn’t rights to execute wget command from /usr/bin/wget and my cron failed, so I made a ticket and the guys from the hosting made me a simple copy of wget binary into my /home with all the rights I needed. After that I modified the script from crontab so it could work with my local copy of wget, and everything cron related was working without a single issue from that day.

SECURE ACCESS TO CRON.PHP WITH .HTACCESS

Now that everything works ok, the question is how to configure your site that your cron.php script couldn’t be accessed from the browser. Otherwise anyone could just refresh /cron.php 5 millions time and put a big load on server.

We can avoid it by limiting access to cron.php file via .htaccess file.

Find out your server’s name: use the command uname –n.

Put the following in .htaccess file

<Files "cron.php">
Order deny,allow
Allow from WEBSERVERNAME
Allow from 127.0.0.1
Deny from all
</Files>

Change the WEBSERVERNAME with your own server’s name.

Test that you can’t access the cron.php from browser

Test that the cron job on linux is running and is executed OK.

That’s all I wanted to share with you today about cron, if you have any questions or suggestions please write a comment.

Monday, September 24, 2012

Today I was attending an extraordinary event TEDx in my own town, I must say I’ve never been to a TED event before and hardly imagined what it will be like, but it was an unusual event because pretty much a lot of topics where open-ended points to discuss. We were around 400 attendees with 12 speakers, speaking in 3 languages (English, Romanian, Russian) and pretty much everyone was willing to listen, to learn and to evolve as a personality.

Before we get started I’d like to thank everyone involved into organizing this event, and I hope we’ll get many other events related or not to IT, I think communication is the key to get to that next level we’ve kept talking about all day long. Don’t think you’re smarter than someone, but if you got an idea that’s burning you inside out, just make it happen, start by small steps and then it will lead you to some kind of lesson learning.

Elena Pahomova – There will be no future

An interesting topic for opening of the event – actually the main idea what Elena Pahomova was presenting is that today is the base for our future, we don’t need to wait until it happens with us. Future is happening now, we model it day by day, so we should live as today dreamers, changing something today, living better today, etc. Another good piece of advice for young journalists was “don’t try to chase big money, work for experience, this is why you got here in first place.”

Octavian Ticu – Bankrupt state with elite sport

Octavian Ticu presented a very good info about the idea of meritocracy and that it is mostly applicable to sports, because we know for sure who is the best one there, there are seconds, kilograms, kilometers, etc. He also talked about one little village in Moldova: Grimancauti, this village with a population of 4200 people, gave us (moldovan) 3 Olympic medalists and a lot of champions in box. Also he compared the years when the most progress is done, and these are the years before and after the USSR period in Moldavian history. He also expresses the idea that as a community, as a state we are not yet ready, we don’t have conditions to raise champions in team sports as football, basketball, and others, because the team is a micro community with all its strengths and flaws. This is why we fail in these types of sports. In several words a very good presentation I’d advise you to watch it on YouTube when available.

Onorica Banciu – Get out from the game

Onorica’s insights on our Moldavian budget are very interesting, she indicated several numbers, which seemed very outraged when measuring the price and the value. Getting as an example a simple Moldovan family from a village she presented some of the day-to-day problems and expressed an interesting idea: “Don’t wait until government will give you something, remember when it does, it means that government first took from someone something and than gave that to you”, so basically when you’re doing great, government is putting pressure on your business, when you’re doing bad it will give you some money so you could still be at least on the edge. So don’t get into the game of protesting without changing anything yourself - stop, innovate, create something new and the changes will come.

Dave Erasmus – Is giving good for you ?

Dave mentioned once again that love isn’t just as simple as a resource, each time you give away love, you’re getting it back. Don’t be afraid of giving something without demanding anything in return, which is the essence of true altruism. As an example on the picture he’s talking about a mother giving everything to her 6 months daughter without getting anything material in return from her. Another idea was that if you have a cause or an idea that you support than getting the funds for that cause is not that complicated, isn’t that complex, just let the people know that you’re passionate about it. Nice talk and a profound one.

Alex Cosmescu – Do you exist ? Really ?

Alex gave the most confusing talk, at least for me. The idea is interesting but not the one that I like, so basically the idea is that life is a union of emotions, feelings, stresses, and many many other things, that we can’t control. Basically life is just happening. And this is why it is not fair to say that you have to suffer more or less than someone else, because life’s just happening want it or not, you can’t change it. Anyway I think this talk enlarged a little bit the common pattern for a TEDx speaker.

Eugen Boico – Remix your way into the future

Once again I loved the presentation. For a beginning artist, designer there is this idea of being unique, that is like a trigger in their mind. But what is the easiest path to express yourself as a creative artist, the answer is simple, that is remix. With loads of data generated every minute on our planet, there is extremely low possibility that you’ve created something unique that was never created before you. But get a piece of art, a track, something that you like a lot, and improve it with your ideas and thoughts, and this way you shouldn’t invest a lot to progress in this area. Remix of course isn’t the only way, but it is the simplest and the most effective one for a beginner. Watch the presentation on YouTube when available.

Ruslan Cojocaru – Happiness 2.0

Unfortunately I just arrived after the lunch at the end of the presentation, but I got the idea of being positive in everything you do and to succeed you need two components: the passion about the project, the passion about what you do, and the other one is the team. Get the perfect team and when you got it experiment with it to do it better. I hope I’ll get more ideas from YouTube watch.

Maria Gaidar – Changing system from the inside

Maria is talking about being an opposition activist in Russia, and than suddenly things changed when she became vice-governor in the social sector of Kirov region. She talks about her problems and how she tried changing the system from the inside, not breaking it but step by step changing the attitude of the people towards politicians, by listening and making reforms where needed and possible. When asked if she thinks a single person could make the difference, she is a strong believer that a single person can do a lot of things using different tools and techniques.

Chad Rogers – Tweeting isn’t enough

Chad Rogers is talking about tweeter and Facebook and other social media that is used by lots of people, what he’s saying about it that you need to be active for sure, but not on social networks because sharing some link or clicking the “Like” button isn’t an action, it is just an excuse for doing nothing. He also says “Remember why everyone hates politicians ? They keep talking but they are taking no action. The same might happen to you”. The word introduced by Chad is “slacktivism” .

Jennifer Brush – Moldovan Youth: Bricks into the foundation of the peace

Jennifer Brush is Head of the OSCE in Moldova. She’s talking about the Tighina bridge that can play the key factor of Moldova’s future if opened. There’s a plan of creating a series of European roads from Kiev to Istanbul – Corridor IX and Moldova is right into the center of this road – this road means prosperity and wealth and growing economics, now the bridge is closed because of our past conflict with Transnistria. Also she notice that there’s another organization that involves multiple countries in Danube zone which is also somehow interested in developing the transport routes, and Moldova can get the benefits that comes with that. She’s asking us at least to show to the governors that we’re aware of this problem. Let’s say it straight - I didn’t know about such plans and such organizations till Jennifer told us about those. Now that we’re aware of it what will change ? She answers that at least if this would be on 5th position in the social polls that would be great, and may be our governors will do something about it.

Dorin Dusciac – Nuclear physics danger comes from ignorance

A hilarious guy, he’s a research engineer at the French Atomic Energy Commission near Paris. He’s talking about the formulas and the concepts with such an ease that it is truly pleasant to watch him, plus he’s always making jokes. For example he explained about Roentgen and Sievert and than he said “So now everybody knows the difference between Roentgen and Sievert? Right. The Roentgen has beard, and Sievert hasn’t”. Than he talks about the myth that the wine is protecting us from the radiation and that is not correct because wine protects us only from one element in the radiation specter. Also he talks that if we fly pretty often than that dose of 1 mSv can be achieved pretty fast. For example if you get 7 flight of 7 hours you get the dose of radiation that is already higher than the yearly limit. Thanks Dorin, for a great presentation!

Dmitry Volosin – Live projects

A serious person with a big experience in internet portals. A lot of ideas here, ok for starters he enumerated some of the components of a successful project: obsession, enjoying the project, accepting failures/deaths of the project. He says first projects are like calf's teeth but when those fall, from these small projects can grow big projects with a base already. On the question “Is it normal to lose obsession from time to time ?”, he says that it’s normal because we aren’t robots and these periods of sadness and desperation happen from time to time, but if you lost for good you obsession than sooner or later your project will die. “You should be on fire with this idea, like Jeanne d’Arc… but that isn’t the best example” A good presentation worth watching on YouTube.

What I would like to say in the end… Please come to these type of events, support this type of movements. Today in parallel with TEDx Chisinau, in our city was organized “VeloHora”, a great bike event, aside with it, near Opera and Ballet Theatre was running a minifootball European championship, today I felt that our city was really alive and I hope such events will occur more and more often,

Tuesday, September 18, 2012

At the moment of writing this blog post I’m working in Pentalog, which is a computer and technology services company, focusing on low cost offshore/nearshore IT engineering and software development.

Few days ago I found out, that as a result of our summer internship program some of the developers from our company created a great tutorial called X-Share. Following this tutorial you’ll create a website, that permits sharing of some objects between the members of a group. As an example it could be sharing books, sharing of the discount cards, sports equipment, etc. This tutorial is open sourced and is on SourceForge.

I hope you guys will find it useful, because one of you right now could be searching for a practical example of a Symfony2 working application. And a little disclaimer: although I’m very proud of what my colleagues have done and achieved, I wasn’t involved in any way in creation and developing of this tutorial, so all the credits goes to them.

P.S. It is great to see how open source community evolves, and I hope X-Share become your first place to show to your new junior PHP developer for learning Symfony2 basics.