Keep on dreaming: I finally wrote my first Node.js app!

It is almost 1am, it’s Saturday night and I have not been clubbing or partying with my friends tonight. I have worked on my latest freelance project writing a Policy about Cookies.

What a bore you would think. Instead I went to bed feeling contented with myself, no, that’s not enough, I felt bloody good.

All of this just because today I wrote my first Node.js app. I lied in bed thinking “WOW, I did that”. I actually understood every bit of code me and my friend Davide wrote (following his guidance).

“So, we all wrote Node.js apps at least once in our life, what’s the big deal?” You would say. Well I thought I never would. Not at this stage in my  ”JS career”.

So while I tried to fall asleep and looked back at the day that has just been what seemed like a small epiphany this afternoon is now a full sober realisation: writing code is easy.

Why have I been so scared of learning in a new/different language? What kept me stuck in PHP  world and only made me feel worse about myself as a coder for writing such horrible, cheap and unsafe code?  What made so difficult for me to think of being able to write a RESTful-similar application? What convinced me that I would never be able to learn anything new?

I don’t know but whatever that voice was, it was wrong. Because it only took us 4  hours to write a simple app in Node.js. and it already included a Foursquare integration.

So what happened to my 14 year old self, that feared nothing and tried to mess about with any possible software she could install ?

That hopeful and playful girl got overwhelmed by how fast our industry changes every day, by the big boys demoing very fancy Node.js projects and thought “no way I can get there before I truly understand and master JavaScript”. So I told myself, like you tell yourself about many dreams “One day. One day”.

When Davide suggested we got together and hacked something, that he would rather do it in JS than in PHP, I simply sat there and nodded thinking “I will never understand and really own the code we’ll write together”.

But after a few very clean explanations I was already understanding how everything holds together and how very little JS has to do with writing an app in Node.js.

I did it. I wrote an app in Node.js . But what really matters to me is that I can now be that dreamy fearless girl again and I can go and hack things. Next on my hit list should probably be Backbone.js and I am not scared!

Keep on dreaming.

 

Snodada, our app in on github for now https://github.com/morena/snodata It’s a foundation app to handle logins with services such as Foursquare and Facebook. We aim to use this app as a starting point for Node.js apps where we will be using multiple APIs and will allow user registration/login using social media services APIs such as Facebook and Foursquare

In Italian snodata means “dexterous”, “flexible”, It’s a pure coincidence that our app is also built with Node.js :)

My trip to Thailand, Laos and Vietnam

People say it’s the trip of a life time, that it changes you completely,but I feel like it’s just the beginning. I spent a month in East Asia for my honeymoon and I just want more.

We visited Thailand, Laos and Vietnam and missed out on Cambodia. So what to expect? What went wrong? Why do I want more?

A lot happened in a month and I was so caught up with it, I did not even realise. So no, back in London, with the cold seasons slowly creeping back, I have finally some time to look back and digest my experience.

What to expect?

It’s hot. Like nothing you’ve ever experienced before, unless, of course, you have already visited a country this hot. So no matter how excited you are, take some time off, spend couple of days slowly adjusting to the weather and to the hours when you arrive at your first destination, by doing as little and as late as possible during the day and turning the air conditioning to as hot as you can bear.A very dangerous cocktail of jet lag and extreme temperature made sure I was vomiting at the side of a temple in the Grand Palace Complex in Bangkok. Not cool.

Big cities are big. The traffic is mind blowing. The amount of people, too, especially as they speak another language. The writing is crazy too in Thailand, all of this made me feel quite spaced out at first.

Night trains in Thailand are the coolest way of transport ever. Ok, maybe not as cool as private luxury jets, but they are cheap (a 12 hour ride from Bangkok to Chiang Mai is maybe around £30); they are clean (compared to anything else in Thailand really), really very safe (everyone is just interested in getting to the destination and there are lots of staff members walking up and down all the time cleaning) and comfortable. I actually had one of the best night ever.

Temples are everywhere. But don’t be banal and say you got bored after visiting the first few temples. And not, they are not all the same. One of my favourite moments was in the big Temple inside the Grand Palace in Bangkok. I was feeling sick (this is about 30 minutes before I vomited, so still some energy left in me), it was boiling hot and there were masses of shouty tourists all around me. I thought I was going to go mad, but when I got to the top of the 3 steps to the temple, nothing else mattered: the wind was blowing lots of little bells; it cooled me down and silenced all those voices. The peace that transpired from the inside of the temple while I was kneeling down (don’t point your feet towards the Buddha!) in front of the Buddha made sure I could resist another 30 minutes before vomiting and it was just me and this magical moment I will never forget.
When we got to Chiang Mai temples architecture had already changed and by the time we got to Vietnam we really missed the Thai temples and their minimalistic but yet majestic beauty: Vietnamese ones were so similar to Chinese ones, it felt like Vietnam’s Buddhist identity got lost somewhere there…which is exactly the reality right now.

What went wrong.

Book in advance. Ok we did it the fun way and only had the first 3 nights booked in a month. Then it all went wrong: we stopped in a place in Thailand that only deserved 30 minutes (Lopburi, the monkey town, to be precise. Don’t do our mistake: if you really want to see the monkeys get off the train wander around for a bit then get back on the train to Chiang Mai) and had to stay there 3 days because there were no places on the night train and we booked too late.
In Vietnam we could not find ANY night trains in the whole of almost two weeks and had to fly everywhere. Unless you have plenty of time, you’ll waste a day travelling each time and the tickets get quite pricey (up to £130 per person one way!) from 3 days to the departure date. So we had to skip Cambodia, but Ayutthaya in Thailand is a mini version of Angor Wat, so if you can’t get to Cambodia, make sure you stop at Ayutthaya.
Trains are awesome, they are really the best way to get around (I’ve heard such horrible stories about buses organised to steal people’s belongings while they’re asleep and dump them at the side of the road, etc) so do your best to book in advance. You won’t regret it.

Too many malaria tablets. I am still not sure if it was the malaria tablets (I was taking Malarone), but on my third week I started to feel very nauseous. This put me off any food. We realised we really should have taken them when visiting rural areas ONLY. Cities were fine really.

Read up as much as you can on your baggage allowance. We didn’t so we wasted £50 an a slow boat shipping, for stuff that may or may not arrive, when we had 2 x 23kg each in our allowance, because we flew business class (again, no normal tickets available) from Saigon to Bangkok and the same on our Premium Economy Qantas flight back.

Vietnam is dirty, dirty, dirty. We landed in Hanoi, the capital of Vietnam, literally in the middle of the Old Quarter. Crazier than Soho, it was all about street drinking on tiny stools on the pavement while snacking on street food that was cooked “at the back of the ground floor room”. Washing up happened on the floor, rinsing crockery happened on the floor, communal meals (cool but yuk) also happened on the floor. I am surprised I did not see people having sex on the floor. 3 weeks in my stay in Asia, I finally got my culture shock and could not for the next week touch any Vietnamese food. In fact this is where my food poisoning slowly escalated day by day. I am so not going back to Vietnam. Oh wait, I have not yet mentioned Hoi An…

Why do I want more?

The clothes in Hoi An & Bangkok. I was never so desperate to board a plane (I hate flying) as I was in Hanoi. The airport was MAYHEM, I am even surprised we made it to the flight. But our stay in Hoi An was much more pleasant – finally, the beach! – if it was not for the fact that in Hoi An beeping is like breathing. We spent 3 days here going back and forward to the tailors, because this is where the quickest ones are (can’t say best ones but if we compare quality, cost and delivery time then…). I spent £250 and got a suit with a skirt and 2 trousers, 3 shirts, an evening dress and a summer dress which is an exact copy of a dress I already have (that was magic!). Don’t go to a shoe maker though, they have not quite mastered FASHIONABLE shoes yet :S

The Siam night market in Bangkok, instead is so trendy, I bought so many clothes there I never found anywhere else.

Thongbay Guesthouse, Luang Prabang, Laos. I should just say Luang Prabang, but I should stress it’s in Thongbay guesthouse that I spent the best moments I have of my holiday: the ones on the balcony over the Mekong river of our bungalow. We relaxed and lived in peace in Luang Prabagan. No hard selling, no rush to drive like crazy, just genuine happy people. This is how Asia should be. With our money and our fuss we have spoilt Asia, I am sure. And I am worried I will going back to Laos one day and find it as fake and as dirty as Vietnam. Laos is one of the poorest country in the area, and even remote tiny village families live in cleanness (hence my cultural shock when I arrived in Hanoi). Luang Prabang is just there, a peninsula stretched with no effort, in a mystic yoga pose, to just let you enjoy yourself in your own time. No beeping, no shouting, no rushing and French Colonial architecture is a key player I think for the relaxed atmosphere. And do go and teach English at the local library on Saturday (might even be every day) afternoon 1pm to 3pm. I went there and my student was a Novice Monk. One afternoon I will never forget.

Wait, did I really ride an elephant? Indeed. And I can use the commands to mount one and make it walk (and a few more). Well, at least if the elephant is Korean. That was scary (I am scared of everything) but riding an elephant holding on a very loose rope is definitely one of the highlights of this trip and of my life. To the point when it felt natural: my elephant was enjoying the walk himself, he put his trunk on the back of his mate who was walking ahead of him and so we strode in peace and at one with nature. Until I had to cross a river ON TOP of the elephant (I can’t swim!) while hugging a very small but smelly Korean Elephant trainer. I survived and will definitely do it again (well, not the river bit maybe).

So what would be my revised itinerary be?

If staying just for a week I’d go straight to Hoi An, arranged for some more clothes to be made, then go back to Luang Parabang for couple days or maybe visit Ventiane and then visit the beaches we have missed in Nha Trang (Doclet for example), while stay a few days at Mia, the amazing 5 star resort (paradise I call it).

If I could stay another 2-3 weeks, I would also add Chiang Mai in the mix, maybe Sapa, then I would definitely visit Angor Wat and some beaches in Thailand.

Mu ultimate advice: book in advance and try and do at least couple connecting flights on one day (that’s another reason why we lost time, by only doing a flight a day then wait at least another day in between).

Addison

I joined the famous Annual Report busy, busy Season at Addison (now Addison Group), part of the WPP.

I worked on the Front End of BG Group’s Annual Report, using latest technologies but keeping the focus on cross browser compatibility and accessibility (thank you Shims!).

The process from paper (where the Annual Reports have always been produced on) to screen is such fascinating domain and I embraced it with its limitations, challenges and incredible solutions and results.

A Browser Basics talk, what concepts would you cover?

I am so pleased to announce that London Web Standards is organising State of the Browser (a conference on the Browsers and their new features) for the third year.

Last year was an amazing experience. For the first time I had given 100% not only to preparing a conference but also to run it during the day. I missed all of the sessions, except a couple, but I definitely enjoyed being there, it felt like being part of the future :)

One thing I noticed was that, while we put had together a very Browser-focused conference (by inviting Browser Representatives to talk about the new and upcoming features) a few designers were there and I hope that they were able follow the main talks. I am not implying designers might not be knowledgeable about browser/HTML/CSS but that I am the first one that is working with them on a daily basis but feels like she don’t really know what’s “under the hood” and that knowing this might actually help her improve her understanding of HTML, CSS, HTML5, CSS3 and JavaScript.

So the other day I thought we could prepare whoever wants to come to the next State of the Browser to what’s ahead of them by putting together a “preparation event” the month before, at one of the monthly London Web Standards nights.

Since then, I’ve been trying to think what would a “browser newbie” need to know before she can attend State of the Browser. I wanted to watch all the past videos, but I also wanted to hear the opinion of our past speakers and of anybody who could help putting together what I think could be a very interesting and useful talk for anybody willing to learn more about how the browser and the technologies used in it work.

This is what I’ve got so far (taken from what seemed to me a very useful page http://taligarsiel.com/Projects/howbrowserswork1.htm

Then I also thought of

  • Local Storage
  • Offline Cache
  • Web Sockets?
  • Geolocation
  • Web Workers
  • Security
  • JavaScript on the Client side?

I would like to know your opinion – is there anything you would not cover, or anything else you would add? I would really appreciate your help :)

The (not ultimate) Hackathon survivor’s guide

One of the tasks as organiser of Titanium App Camp is to write a collaborative Hackathon survivor’s guide, so here are my tips, according to my possibly limited experience. I have attended 5 hackathons in the past 3 years and all of them have been quite challenging. I’ve won none and I hated not winning so next time I think I will follow my checklist more than my heart :)

0. Don’t be scared/shy

I don’t want to hear any excuses ”but I’m only a designer, I can’t code”. Nobody will witch hunt you for that. There are coders like me who are a rubbish architect, or/and a useless project manager or/and a hopeless designer. I need all those skills in order to produce something solid and pretty so please come to hack days and form a team where your skills will be definitely in need. I know there will be downtime, but it’s part of the challenge. “I don’t know anyone” – I’ve gone to hackdays literally on my own. No team, no friends and yet I’ve met the most interesting and kind people. It’s a social event (even if at the eyes of most non tech people it’s not social at all) so people tend to speak to you a lot easier than possibly in a bar or cafe (ok, I might have exaggerated a bit on the bar comparison). Plus you’re bound to bump into a Twitter acquaintance to which you will be able to finally put a face against :) “I only code when I get paid”. Although this one could be a respectable reason, I truly believe that there is so much value you can take from a hackathon. If you want to learn something new it’s a unique opportunity to do so. I remember the lovely and most patient Daniel Knell and Chris Lockteaching me how to use Zend; the Facebook engineers being on site (lots of them) to explain in details how to use the Graph API. the ever so patient Twilio devs helping me setting up a call and text messaging through their API. I learned skills I can now use in my day job and get paid more because I know this new stuff! And if your idea is really good you might land some funding! VCs and press often attend hackathons!

1. Pitch your idea

Do you have an idea already? pitch it to a few friends, techy and non. Do they honestly think it’s a good idea, or just useless? At hackathons I’ve seen spectacular ideas win, as well as quirkiest ones, so it’s not as if only the most useful ideas win…

2. Don’t start before the hacking time begins.

It’s rude and unfair. Although I think some people must come in with some sort of “basic codebase” they can then adapt. In a way, I recommend this and I will definitely try to do this next time. Not to bring something specific to the hack, but a working base. For example this could be the previous hack you have built, maybe stripped out of specific modules, but you know you will need (I’m making an example using Zend Framework) a user model and a database model, so you might as well keep those. Whatever you do think very carefully, I’ve spent hack days where I got nowhere because I wanted to build my hack in Zend (just to learn more about it) and got really anal about setting up models and controllers the right (hopefully, all part of the learning curve) way. Whatever you bring don’t cheat, start when you officially can start, it’s more fun and deep down you know you will have won (hopefully) in good faith.

3. Form a team

Idea or no idea, try and find some friends/colleague to team up with. I usually go to hackathons on my own because at times I just go to play around with a new technology and learn something new and therefore get lost in the learning process and don’t really finish what I build. But to make the most of it, form a team with skills that complement each other. If you can’t find any friends of colleagues then post a message on Twitter with the event’s hashtag and ask to be retweeted, or post a message on the event’s meetup page/facebook page/comment area, etc. You can also form a team on the day. There is usually a shout-out for “people with skills but no ideas”, or “people with ideas but missing skills”.

4. Don’t choose your hack just yet

I might be explaining something you already know, but at hackdays there might be rules on what to build (or not). There mostly will be categories i.e. “the mobile app that uses both Spotify and Last.fm’s APIs” or “best for children” etc. Each category winner will get a prize (could even be a tablet or a phone!), so there is not only an ultimate winner, but you could aim to win one of the categories. So before you set on an idea, wait until all the sponsors/categories owners have pitched their request. Some of them will want a problem solved i.e. “build a Spotify app that works with food” or “build an archive of music videos pre 1990s”. Then make your decision.

5. Look at the available APIs and datasets

This should give you an idea of what you can actually build. On the day be really careful about the dataset you choose. When deciding which of your ideas to build, the API/dataset you chose could have a big impact on your work. APIs are usually safer, but still check that the API has an endpoint for what you are looking for. I once decided on a hack to then discover the API was not actually exposing the info I needed. APIs usually come from the sponsors, so there should be a list on the event’s site. Datasets are less safer. I’ve been at hackdays where the data was in a very messy Excel file and was only available for a small part of London. Not only I had to clean the data, but to then discover that to obtain the rest of the data I had to go to the Fire Brigade’s Archive and manually consult some record books. Only having part of the data made my hack kind of useless. Some companies/organisations have provided datasets in PDFs (!!!) or messy Excel file, so if you decide to use this data you will have to import it in a database and I’ve seen hackers spending HOURS doing that blocking the progress on the hack. So at least bring an CSV reader script as a base.

6. Think about where and if to store the data.

What data do you actually need from the API? If the hack is just a quick one then querying the API on every page load won’t hurt. But think about  daily/hourly query limits, the last thing you want while building and testing (yep, happened to us) is to be blacklisted from an API provider who will not be on hand to give you unlimited access for the day/weekend (the sponsors who provide APIS will instead be on site and able to whitelist you, just ask them). So think of all the data you need and only put through a request when you have a spot on query – I know this is hard, but ask some help and work on the perfect query on paper. Then cache your request or save it against the current user in the database. Or if you need for example, a list of venues, make a search query once, then write a script to save it into your DB. That way you don’t have to make a query to API any longer.

7. Plan

I don’t know quite how much to stress this, but I’m a rubbish planner, I’m an impulsive coder, so I will just follow the flow rather then architect my hack. So don’t waste your time like me, plan everything, write wireframes, think of all the options.

8. Eat healthy

I know it’s easy to be glued to the chair/bean bag/bench/floor when you are deep in code, but if you want to be productive you have to eat. So when dinner/lunch are served take a deep breath and go get some. It’s also a great time to socialise, find some help for something you are stuck on and your break will really help you going back refreshed. There will be TONS of sugar snacks and drinks. Watch it. I’ve spent hack days surviving on sugar and felt so ill on the Monday. Eat fruit and drink plenty of water.

9. Prepare an awesome presentaion

It’s essential that you take at least an hour to prepare for your presentation. Appoint the best person for the job. Ideally you want somebody with a sense of humour, with a clear and loud voice. You only have about a minute and you have to use it wisely. I am no expert (I have indeed pitched and forgot a big bunch of features I was meant to mention and made jokes nobody laughed at – that was really hard to accept) but the trick is just to plan it properly and write a simple speech. Imagine you have to explain how your hack works to a very non techy person. You must have spent the last day building this so you might be very comfortable and knowledgeable on how to use it, but remember you are presenting it to complete strangers who will have to judge your work.

10. Test, test, test

Most importantly test your demo. Demos is where it can all go wrong. Try it many times before you go on stage, you won’t have time to wait for it to load…   Excited? Then come to Titanium App Camp, an uncoference and a hackathon on the 2nd and 3rd February!

What 2012 taught me: organising conferences it’s a piece of cake, learning how to drive it’s not

On a personal level 2012 has definitely been the hardest year in a while…

The scary bits

The scariest thing (it would appear to be) is that I have left a permanent job and went Freelance. When I did it I was not scared. The work has come in regularly and I have not been without work for longer than a week. Except now. And for the first time I am scared I will not find something.
I should definitely write a separate post on encouraging people on starting contracting in Web Development, but I am not sure some employers would appreciate me pushing some permanent employees to do the big jump…
Anyway it was the best decision I’ve made in ages. I am free, I get to meet lots of people and work on new stuff on every project.
The downside? You’re on your own. If you are stuck with a bug or a problem, there is no team mate or experienced boss you can ask help. Luckily in the era of the social media, I have been able to Tweet for Help and some vey nice people have looked into my troubles and offered me a hand.

Thank you :)

I also did lots of other scary things…

I’ve gone skiing for the first time and challenged my fear of heights and of skiing.

I’ve started to learn how to drive and discovered how hard the practical exam is. Or, excuse me for saying this, how much a big business it is – I am now on my third attempt, feeling very comfortable and able while driving, but still failing the test on very small things – OK I could do with improving my behaviour on roundabouts, so hopefully I will past next time…

I have had my first minor operation, under sedation, of course. I am so scared of any medical operation. When I ask somebody “how painful is that operation?” everybody seems to say “it’s the pain afterwards the worse part” and I’m like “I don’t care how much painful it is afterwards, I am scared about the pain I will have DURING the operation.
So after begging my dentist to get a tricky wisdom tooth out under sedation, I had the best experience of my life (except for the students repeatedly failing at performing a smooth intravenous injection): literally, as soon as the drip got into my body I was completely out. I “woke up” (I was always conscious, just in a happy place somewhere…) not remembering anything but most of all not feeling any pain and/or sign of having received an operation.
What struck me though was the fact that I somehow performed Jingle Bells with the aid of the beeping heart monitor… So definitely repeating an “under sedation” any time soon.

The nice bits

I got engaged! Which I never thought would happen AND to the best soul mate ever, so how could I ask for more?

The one thing I really enjoyed this year was organising State of the Browser for the second time. I loved every hard worked/ing second of it. I loved contacting the sponsors, getting all the speakers ready, attending amazing sessions by the best in the industry (like my favourites Bruce Lawson, Martin Beeby, Pete Gasston – it is quite a thing to bring your favourite speakers to a conference you are organising!) and most of all I loved working together to the other amazing organisers of London Web Standards. I’ve never worked with such enthusiastic and caring volunteers.

The sad bits

On that note I have made the hard decision to leave my role as band manager of the folk band Amaraterra and of Vice President of the Apulian Association Friends of Puglia. As a volunteer, organising tech conferences for 175 people seems to be much easier and to be bringing so much more happiness to me than to organise small events for a bunch of Italians.

So what will 2013 bring me?

Oh..I’ve only got 2 conferences and 1 wedding to organise on my cards…FOR NOW…I am sure it will be amazing but challenging.

So help me by attending both, they are free!

Titanium App Camp, 2nd-3rd February http://appcamp.londontitanium.co.uk/

State of the Browser, April some time http://browser.londonwebstandards.org/

I also plan to pass the bleeping driving test (one day…), to organise the most eclectic wedding, to finish two hacks, tour the Mekong region (that’s already booked so THAT’S definitely happening yuhuuu) and possibly start wearing contact lenses (I need to overcome my fear yet…).

Happy 2013 everyone!

 

Embed Google Groups in WordPress

One of the requests I got from my current client is to embed Google Groups discussions into a page/post on WordPress.

First of all before you read further, I think you should consider your Google Group settings – public or private? If you make your group private (members only, so users have to apply to get access to the group content) you won’t be able to expose it to the public and this works also if you embed it. The same should stand for exposing the group through API but I have not tested this yet, in this post I will only cover plugin or code embedding.

So if your group is public then you should read ahead. The first option you have, for example if you’re only embedding one group is to just add the code on this page on your post or page changing forum-name to your group name (which you can find in the URL of your group i.e. the “angrybirdsdaylondon” in https://groups.google.com/forum/#!forum/angrybirdsdaylondon )

<iframe id="forum_embed"
 src="javascript:void(0)"
 scrolling="no"
 frameborder="0"
 width="900"
 height="700">
</iframe>

<script type="text/javascript">
 document.getElementById("forum_embed").src =
  "https://groups.google.com/forum/embed/?place=forum/forum-name" +
  "&showsearch=true&showpopout=true&parenturl=" +
  encodeURIComponent(window.location.href);
</script>

Before I take you through a few extra options, you should know that if your group belongs to an organisation then you will need to specify that in the settings. If you don’t you’ll get an iframe populated with posts on sex and viagra and you so don’t want your client to see that, right?

The setting you need is

&domain=yourdomain.com

So you can personalise the output by adding the following settings to the URL i.e. https://groups.google.com/forum/embed/?place=forum/forum-name&domain=yourdomain.com&showpopout=true&theme=default

  • showsearch: whether to show an embedded search box on destination forum pages. (default is false)
  • showpopout: whether to show the “popout” button which lets the view be expanded to a full page, on destination forum pages (default is true)
  • hideforumtitle: if you want to show the forum title and description, false if you don’t want to show the title or description (default is true)
  • hidesubject: if you want to hide the subject of the last post in My Forums view, false if you want to leave the subject visible (default is true)
  • showtabs: whether to show tabs for changing views (e.g., to the Members view), on destination forum pages (default is false)
  • width: the width of page (default is 100%)
  • height: the height of page (default is 800px)

Your other option, especially if you want to display multiple groups or different groups in different pages and posts, is to download Odyno Google Groups made by a fellow Italian, Alessandro Staniscia.

The setup is very easy. You just install the plugin then you add the following shortcode to a page or post, just swap “name-of-group” with your group name:

[google_groups name="name-of-group"]

The same settings as above apply to the plugin too, for example from Alessandro’s site

[google_groups name="mixare-development"  width = '100%'  height = '800px'  showsearch = 'true'  showtabs = 'true'  hideforumtitle = 'true' hidesubject = 'true']
 Enjoy it!