Introduction

The #100DaysOfCode is a challenge that aims at making coding a habit. The concept is very simple. Every day, you spend at least an hour doing non-work related programming. The challenge also insists on building projects, and not spending your time doing only tutorials or following courses. You must put what you learned in practice doing real projects. The projects are totally up to you of course, depending on your current skills and/or needs.

You can find more information about the #100DaysOfCode on Alexander Kallaway’s blog post.

The most important thing, in my opinion, is not the habit in itself, though it is very important. The crucial thing to me is being accountable. Hundreds of people are taking this challenge. You have the knowledge that you are not alone. You are also committing to tweet your progress and encourage at least two people each day. There is a level of accountability and connectivity with other people that just make the whole thing so much more appealing to me, and therefore, I feel confident I will be able to do it.

What to build?

That is the bit question that I had. I finished the FreeCodeCamp curriculum, all three certificates. So, I won’t be re-building any of those projects. In my opinion, in order to succeed, the projects I will choose must follow a few rules:

  • Must not take too much time to realise (the goal is to create several projects in that timeframe of 100 days)
  • Must be challenging, but not impossible. I’m not the best developer out there, so I need to choose projects I an actually do. In the mean time, the goal is to push myself, I must choose something outside of my comfort zone.
  • Must be something I would like to do. There are billions of different things I can code, but not every single one will be appealing to me. This is outside of work. **Having fun **is the number one thing I’ll be worried about.

Every single project I will choose to do will have to follow those three rules.

The brainstorm (!!!)

I spent a little bit of time thinking about this, and I cam up with this, so far:

  • War (Card Game)
  • Make a Diary application
  • Make an app using the NASA’s API
  • Belote (French Card Game)
  • A real-time application (socket.io)
  • Something with Bots ?

Here are 6 different projects that I came up with. As you can see, it is still very vague. I only researched the first one a bit deeper (War). In the holidays, I played a lot of card games with my family. That was amazing and this is why I put two cards game in there. The socket.io application is kinda related to my work, but I always enjoyed working with real-time technologies. The rest are just the scratch your own itch type of application.

Will I be able to do all of this in 100 days? Doesn’t matter. The goal is to build an habit of coding every day. The goal is to make sure that you are use to be outside your comfort zone and learn every day.

In each of theses applications I want to build, there are things I don’t have much experience with. The animations that will be required in the cards games for example, never used that before.

So, this is it! I’m personally starting tomorrow (January 3rd). I look forward to see any of you on this path.

As always, feel free to comment and share.
Have a nice day!

Read more

Introduction

I recently started to work with a company as a freelancer. As I got access to the source code, I had the chance to look around at what technologies were used and the particular syntax that the software was written into. The software uses Socket.io for most of the communication client-server. But, as I was looking at the packages used and the code, one of those packages was socketio-file-upload. With this blog post, I’ll try out this package in order to understand better what it is supposed to do. Let’s jump into it!

What is it?

Here is the description we can read from the github link I gave you in the introduction.

This module provides functionality to upload files from a browser to a Node.JS server that runs Socket.IO. Throughout the process, if their browser supports WebSockets, the user will not submit a single HTTP request. Supports Socket.IO 0.9 and 1.0.

The intended audience are single-page web apps, but other types of Node.JS projects may benefit from this library.

Since version 0.4, this module also supports monitoring file upload progress.

Simply put, you can upload files from the client to the server using sockets. I upload a file, without using AJAX or any HTTP requests and it will be saved by the server, in a directory of my choice. Let’s see that!

Begin by create a new directory, and run npm init

Accept all the defaults and then run:

npm install --save socketio-file-upload express pug socket.io

We will connect the router of the socketio-file-upload to express later.

Let’s create a file called server.js

server.js

const express = require('express');
const app = express();
const httpServer = require('http').Server(app);
const path = require('path');
const siofu = require('socketio-file-upload');
const socketServer = require('socket.io')(httpServer);

app.set('view engine', 'pug');
app.set('views', path.join(__dirname, '/public/views'));
app.use(express.static(path.join(__dirname, '/public')));
app.use(siofu.router);

app.get('/', (req, res) => {
    res.render('index');
});

socketServer.on('connection', socket => {
    console.log('Socket connected');
    socket.emit('data', 'Hello World');
    const uploader = new siofu();
    uploader.dir = path.join(__dirname, '/files');
    uploader.listen(socket);
});

httpServer.listen(3000);

Ok, let me explain a little but this code. Most of it is setting a socket.io server with express and and http server. If you don’t know how to do this, I wrote a blog post on getting started with socket.io.

After all this setup, you can direct your attention to the socketServer connection. You can see that we instantiate a new SocketIo-file-upload instance(named uploader). Then, we tell this instance where we want the file to be upload. In this case, I want my files to go to the /files directory. Finally, this instance needs to listen to the socket that just connected.

Note: Socketio-file-upload will NOT create the directory for you if it doesn’t exist. It will throw an error instead.

That is all we need for the back-end. Let’s code our front-end now. We will use several methods from the socketio-file-upload package. First, in your public/views directory, create a file called index.pug :

index/pug

h1 Hello Index
input(type='file')#fileUpload
button#file_button ClickHere
script(src='/socket.io/socket.io.js')
script(src='/siofu/client.js')
script(src='../js/main.js') 

Nothing crazy here, a file input and a button to play around with a method we’ll see in our js file. Then, we link to our 3 different scripts. One for the socket.io library, one for the socketio-file-upload library (both are in our node_modules directory) and one for our custom script called main.js. Let’s see our custom main.js:

//Connection to the socket library
const socket = io();

//This is some classic socket.io event listening
socket.on('data', data => {
    console.log(data);
});

//Here is our socketio-file-upload code
const uploader = new SocketIOFileUpload(socket);

uploader.listenOnInput(document.getElementById('fileUpload'));

uploader.addEventListener('start', (event)=> {
    event.file.meta.extension = 'csv';
});

document.getElementById('file_button').addEventListener('click', uploader.prompt, false);

Ok, here is how we do things. We create a new SocketIOFileUpload instance, with our socket as a parameter. We can use the listenOnInput method on our input file. As you can see, we pass the DOM element that we want to listen to. When we will choose a file, we will trigger this event.

When we do that, we will go back to our server.js file. Our socketio-file-upload instance on the back-end will receive this file (remember that it listens to our socket). Once it receives this file, it will store it in the directory that we specified.

I added some custom code on the start event of the instance. You can write on the event.file object for example. Here, I decided to add extension : 'csv' to the meta object. You can imagine that the possibilities are infinite when it comes to playing with the object.

Lastly, you might have seen on the index.pug that I added a button. The last two lines on main.js adds an event listener to a click event on this button. I use the instance.prompt method (instance being here uploader). This will trigger the opening of the same window you would have on a input file.

That’s it! Those are just a few methods available on the socketio-file-upload package. To learn more, you can visit the very good github socketio-file-upload page. You can peak at the documentation to learn more.

Note: you may wonder what is the difference between this package and the socket.io streams package. The stream package will be user to read files. We create a stream to read the contents of the file. With this package, we do not read it, we store it in our files directory (in our case). We could of course read the file with a socket stream and then upload it. Or upload it, then read it with a stream. Both those packages could be very complementary in my opinion.

Feel free to share and comment!
Have a nice day!

Read more

Introduction

Yesterday, I received my Pavlok. If you are not familiar with it, Pavlok is a device that is focused on changing your habits with the help of electrical stimulus. The most effective way to use it is to zap yourself when you are doing a bad habit. For example, every time I bit my nails, ZAP!

The Pavlok system tries to break the cue-routine-reward path by making the reward not as pleasant. If your habit is rewarded by an electric shock, your brain will associate this habit with pain or discomfort. Because we are creatures of pleasure, we will most likely stop doing this habit.

But, as a part of the Internet of Things trend, Pavlok also allows you to customise its use and add some tweaks. For example, there is a Chrome extension available. If I spend too much time on Twitter, I will get zapped. I also linked my Pavlok with RescueTime. This way, I get notified when I’m being productive (vibrating), when I could do better (beeping) and when I’m being baaaaaad (ZAAAAP !).

Ok, so this is great. But the even cooler part is this: Pavlok has a developer API that allows us to interact with our devices through code. This is what this post is about: getting started with the Pavlok developer API.

Getting started

We will use Node.JS to achieve this. First things first, we need to register our application, the same way we would do with Twitter in order to use its API. To do this, visit this page. Enter the name of your app and for the callback URL, just enter http://localhost:3000/auth/pavlok/result .

Great, now our app is registered. You will get a Client ID and a Client Secret. We will need them in our app.

Create a file, let’s call it test.js.

First, run npm init. Select the defaults and then run npm install --save pavlok-beta-api-login

Let’s write our code!

const pavlok = require('pavlok-beta-api-login');
const ClientID = "YOUR_CLIENT_ID";
const Secret = "YOUR_SECRET_ID";

// Init your device
pavlok.init(ClientID, Secret, {
        verbose: true,
        port: 3000
});

//login
pavlok.login( (result, code) => {
    if(result){
        console.log('Code is', code);
    }
});

// Your device will beep
pavlok.beep();

//Your device will vibrate
pavlok.vibrate();

//This is a pattern
// (Beep & Vibrate) * 3
pavlok.pattern({
"pattern": ['beep', 'vibrate'],
"count": 3
});

And that is all we need!
Run node test.js and your device will respond to the stimuli. You Pavlok application will also receive notifications with the name of your app! Awesome!!

Note that the code will be different if you host your application. On local, this code will be fine. But if you need to host it, you’ll need to change a few things. You can check the npm pavlok wiki page to get more information on how to do this.
You can get more information about the device on the Pavlok website and more information on the Developer API can be found on the Pavlok Developer API

I’ll post more informations as I keep playing with it. But this is enough to get you started. Have fun!

Feel free to comment and share!
Have a nice day!

Read more

Introduction

In this article, we will see very simply how to use namespaces with socket.io. Namespaces allow us to group sockets based the page the user visits. In our example, we will use three different groups. One group will contain the sockets in the index page ‘/’, another in the ‘/products’ page and another one in the ‘/contact’ page.

First things first, create a directory that will hold our project. Then, run npm init. Accept the defaults and then install our needed dependencies with :

npm install --save express socket.io 

Ok, now create 4 files, server.js, index.html, products.html, contact.html.

Let’s start with our server.js:

const express = require('express');
const http = require('http');

const app = express();
const server = http.Server(app);
const ioServer = require('socket.io')(server);

//Namespaces Socket.io
const indexUsers = ioServer.of('/');
const productsUsers = ioServer.of('/products');
const contactUsers = ioServer.of('/contact');

// Express file rendering
app.get('/', (req,res)=> {
    res.sendFile(__dirname + '/index.html');
});

app.get('/products', (req,res)=> {
    res.sendFile(__dirname + '/products.html');
});

app.get('/contact', (req,res)=> {
    res.sendFile(__dirname + '/contact.html');
});

// socket.io logic

//Index page sockets
indexUsers.on('connection', socket => {
    socket.emit('connectionMessage', 'Welcome to the index page');
});

//Products page sockets
productsUsers.on('connection', socket => {
    socket.emit('connectionMessage', 'Welcome to the products page');
});

//Contact page sockets
contactUsers.on('connection', socket=> {
    socket.emit('connectionMessage', 'Welcome to the contact page');
});

server.listen(3000);

Quick explanation: We begin by initialising our socket.io server like usual. We use express to server our three html files. Nothing crazy so far. But notice that we define three variables with the of() method on our ioServer. This tells socket.io that depending on the connection made in the front-end, we will group sockets differently. We are then able to use the emit event (or the on event) on those namespaces like any other socket. Let’s see how our three html files will look.

They all look very similar, but I wanted to make sure that everything was clear.

index.html

<!DOCTYPE html>
<html>
    <head>
        <title>Index Page</title>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.1/socket.io.js"></script>
    </head>
    <body>
        <h1>Welcome to the Index Page</h1>
        <h3 id="message"></h3>
        <script>
            const socket = io('/');

            socket.on('connectionMessage', message => {
                document.getElementById('message').innerHTML = message;
            });
        </script>
    </body>
</html> 

products.html

<!DOCTYPE html>
<html>
    <head>
        <title>Products Page</title>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.1/socket.io.js"></script>
    </head>
    <body>
        <h1>Welcome to the Products Page</h1>
        <h3 id="message"></h3>
        <script>
        const socket = io('/products');

        socket.on('connectionMessage', message => {
            document.getElementById('message').innerHTML = message;
        });
        </script>
    </body>
</html>

contact.html

<!DOCTYPE html>
<html>
    <head>
        <title>Contact Page</title>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.1/socket.io.js"></script>
    </head>
    <body>
        <h1>Welcome to the Contact Page</h1>
        <h3 id="message"></h3>
        <script>
            const socket = io('/contact');

            socket.on('connectionMessage', message => {
                document.getElementById('message').innerHTML = message;
            });
        </script>
    </body>
</html>

Alright, the structure of those files is exactly the same. Standard html, with a script for the socket.io CDN. Then, two headers, a h1 that tells us on which page we are on, and an h3 with the id of message. In our script, the socket reacts to the connectionMessage event by putting the message in our h3.

Can you spot the difference between those files?
The definition of our socket is different. The argument in our io() function is what creates the namespace. In combination with the variables definition we did in server.js, we created separated groups of sockets that can emit and respond to socket events independently from one another. Pretty cool huh?

And that’s it! This is a very simple beginning, just to make you understand how this thing works. Of course, this opens a lot of different possibilities. Go ahead and experiment!

As always, feel free to comment or share.

Have a nice day!

Read more

Introduction

I recently started to work with a company as a freelancer. As I got access to the source code, I had the chance to look around at what technologies were used and the particular syntax that the software was written into. The software uses Socket.io for most of the communication client-server. But, as I was looking at the packages used and the code, one of those packages was socketio-streams. With this blog post, I’ll give a quick example of how this package works.. Let’s jump into it!

What is it ?

Here is how it is described:

This is the module for bidirectional binary data transfer with Stream API through Socket.IO.

Combining the native Node Stream API with Socket.IO. That sounds promising. One of the advantages of using streams with Sockets is that, if you end having to transfer a lot of data between the client and the server, it can become very slow. Streams, on the other end, listen to a data event, meaning they receive and send data by chunks. Let’s try to build something with it.

We are going to do something very simple, as an example. Let’s say I want users to send my a file and I will receive it and write the content of the file I received into a whole new file.

We will use socket.io-stream to create a new stream on the front-end. That stream will send the data to our back-end who will then write its content to a new file.

First, create a new directory and let’s install what we will need.

npm install express socket.io socket.io-stream

Then, let’s create two files: server.js and client.html

Here is how our server file will look like:

const ss = require('socket.io-stream');
const path = require('path');
const app = require('express')();
const server = require('http').Server(app);
const io = require('socket.io')(server);
const fs = require('fs');

io.on('connection', socket => {
    console.log('connection');
    socket.emit('connected', 'hello World');
    ss(socket).on('file', (stream, data) => {
        stream.pipe(fs.createWriteStream( Date.now() +'.txt'));
    });
});

app.use((req, res) => {
    res.sendFile(path.join(__dirname + '/client.html'));
})

server.listen(3000);

We require our dependencies at the top. We create a server in order to use socket.io. Express will help use send the static html file on the front-end. So, as you can see, socket-stream listen to an event called file, this event will get two different arguments, a stream and the data. We then use the pipe method on that stream to connect it to a writable stream. This new writable stream write our content to a new .txt file. Let’s take a look at the front-end now.

client.html

<!DOCTYPE html>
<html>
    <head>

    </head>
    <body>
        <input type='file' id="file" />
        <script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io-stream/0.9.1/socket.io-stream.js"></script>
        <script>
            const socket = io();
            let fileElem = document.getElementById('file');

            socket.on('connected', data => {
                console.log(data);
            });
            fileElem.onchange = e => {
                let file = e.target.files[0];
                let stream = ss.createStream();
                ss(socket).emit('file', stream, {size: file.size});
                let blobStream = ss.createBlobReadStream(file);
                let size = 0;
                blobStream.on('data', chunk => {
                    size += chunk.length;
                    console.log(Math.floor(size / file.size * 100) + '%');
                });

                blobStream.pipe(stream);
                blobStream.on('end' , ()=> {
                    console.log('done');
                });

            }

        </script>
    </body>
</html>

The html is very simple here, just an input that accepts file. I use the CDN service for socket.io and socket.io-stream. You could use require() if you are configured for that.

So, anytime that our file input changes, meaning that we give a new file, we create a new stream thanks to socket.io-stream. Then, we emit the file event. The event can take a few optional parameters. Here, I give a stream parameter, and the file size. Then, I create a read stream thanks to createBlobReadStream . A Blob is everything that is not Javascript data (like a file). I added a little snippet to display the progress of the upload (with on(‘data’) ). Then, we connect this read stream to the stream we created at the beginning (which is also the stream we gave as an argument in our emit event).

And that is pretty much it for our application. You can try it out by running:

node server.js  

You will see that every time you try to upload a new file, the progress will be shown in the console. And you will see a new file appearing in your directory.

Obviously, there are a lot of possibilities to use this. But, I think it is a nice start.

Feel free to ask questions and share!
Have a nice day!

Read more

This blog post is not about any kind of technology, library or language. It is not about the soft skills either. You see, as a football player (the soccer type), I have been practicing the game for nearly 20 years now. If you are engaged in any kind of sport activity or musical activity, chances are that you have been practicing something (as in repeating a move or a drill over and over).

Musicians play their scales or some piece of music as a warm-up exercise or practice. Athletes prepare their bodies for practice or competition. I can name a few drills that I’ve been doing for 20 years as a football player. Drills that are accepted in this sport as must-do to improve. It is expected for an athlete or a musician to spend time by himself or with a team practicing, without the pressure of the competition.

What about programming?

What drills or exercises programmers do, or must do, in order to become more efficient? Is there any warm-ups that programmers do in order to produce right away?

More mental than physical

It is pretty safe to say that being a programmer relies more on mental skills than physical ones. Solving problems with code. Make sure that we communicate clearly to other developers and clients.

On the physical side on things, make sure that your body posture won’t hurt you. Sit comfortably with your back straight. I could probably imagine one aspect that could be improved physically, how fast we type. Typing without looking the keyboard. You can find places to practice this like typingclub. What about your favourite editor shortcuts? Would it be worth it for programmers to spend some time each day or week learning or practicing these shortcuts?

What about the mental things? Do you have any rituals that make you more focus? Things that make you more efficient in solving problems? I do some meditation personally, and I can feel more focus for some time. But the main thing seems to be the complexity of the problem at hand. If a problem is too simple or way too complicated, I will lose my concentration much more easily than if I have a challenging problem, but not TOO challenging. You know, that sweet spot.

So, yeah, those are a couple of thoughts that I had. I am currently reading Peak from Anders Ericsson and Robert Pool about deliberate practice. I’ll probably write a post about what I read and maybe try to design some things that could make me a better programmer.

In the end, I believe that you need to code to become a better programmer. But repeating the things you already know how to do without trying to make it better or even different won’t get you anywhere. It is clear that the notion of feedback, when one is trying to improve, is always essential.

Let me know what you think, what you do to practice, to improve.

Feel free to share and comment.
Have a nice day!

Read more

As part of my freelancing journey, I have recently being asked to perform a technical test. The content of that test was as follow:

  • Use Javascript on both the front-end and back-end.
  • Users must be notified when another user connects or disconnects
  • The application will send an offer every 15 seconds. This offer will have a random price and can be accepted by the users. After, 30 seconds, that offer expires.
  • Users must be notified when an other user accepts an offer.
  • Users will be authenticated by their IP addresses.
  • Users can see the offers they accepted in the past and the other users connected.
  • Use whatever technology you see fit, no restriction (must be Javascript though)
  • Everything must be in real-time.

Ok, so this was the test. Build a web application that follows those stories. The real-time part is obviously crucial here, and it makes perfect sense. As a potential buyer, I can only buy offers that have not been accepted by another buyer. So, the updates on the offers must be done in real-time. Same thing concerning the connected users. Everybody will have the same information at the same time. One user can’t be shown connected for one user, and disconnected for some.

Now, the previous accepted offers was an interested challenge. Indeed, this feature will change for every single user. Everybody will have accepted different offers. One offer can only be accepted by one user at a time. This part of the application was the most difficult to solve for me. Let me give you a quick overlook of how I did it.

First, what technologies should I use? The real-time concept made me choose socket.io. I honestly haven’t looked around for other libraries that would allow you to use WebSocket in this way. WebSocket is a web protocol that allows the client and the server to communicate to one another (in real-time). You can find more information about socket.io here.

At the time, my knowledge about this library was kind of limited. I knew the basics, but the idea of sockets sending data to only certain sockets was new to me.

If you use the socket.emit() method, the socket will send whatever data it has in its argument to ALL the other sockets, including itself. That is the perfect function for a chat room for example. If a send a message, I want everyone to see it, including myself. Great, but in this case, I’m only looking for that when I display the offers. The server sends the available offers for everybody. What about the other use cases?

Let’s talk about the notifications first. The connection, disconnection of a user, and the user accepting an offer. Here, I want to send the data to everybody except the user that is responsible for that action. In socket.io, it means the socket responsible broadcasts the data to the other sockets. Like this:

socket.broadcast.emit('notification', 'User just connected');

Done! I just joined the party, but only the other participants have been notified. Problem solved.

Next, the accepted offers issue. This one was tougher. I couldn’t get my head around this. How do you send the concerned data to the only socket that needs it? I tried to use the socket.broadcast.to(socketID) method. But that didn’t work. I think this method is only reserved to send data to other sockets. And in this case, I was retrieving the accepted offers from a database, and sending that to the socket. the socket was sending the data to ITSELF. And then, after much research, I found a way to do it.

Rooms

That’s right. You see, in socket.io, you can group sockets in rooms. Think about chat rooms, it works the same! When I join a room in a chat application, I won’t receive the messages from other rooms I’m not a part of. Well, that’s exactly what I needed to do here! Create a room for each user, and broadcast the data of their offers to their room of one. I needed to make sure that each room would have a unique name, so different users would not have colliding room names (therefore wrong data concerning offers) by accident. Well, remember the list of user stories. Users are recognized by IP addresses, so:

//get IP address of the socket at the connection
const userIP = socket.handshake.address;
//create unique room
socket.join(userIP);

Then, in order to send data to this particular socket, I used:

io.sockets.in(userIP).emit(data);

And voila! Use the io global to get all sockets and filter the existing rooms. I tell the application to only send the data to the sockets in that particular room. And because I used the IP addresses, there is only one member in each room, and no risk of sending data to the wrong person.

If you want to see the application live, it is hosted on Heroku here.

As usual, I’m sure there is a better way to do this, more elegant way. But, the first step is to make it work. It does! I would probably need more intel about the WebSocket protocol and the socket.io library. But it was a really fun little project to work on.

As always, thank you for your time, and feel free to share and comment!

Have a nice day!

Read more

I love Open Source. I committed myself to learn with Open Source when I started this journey as a developer. I benefited immensely thanks to the community. The tools, the courses, the people… But, one thing I have struggled with is, how do I give back? How can I help Open Source like it has helped me?

 

The first steps to contribution to an Open Source project are complicated. You may have read about some stories already. Mine is not different. As of today, my contributions include some translation for the FreeCodeCamp repository and some CSS syntax stuff for a project that I forgot… I just replace some ‘-‘ by ‘_’ . Nothing really big, but you have to start somewhere.

 

When you are looking to contribute for the first time, I believe the most important thing is the community you will be part of. Are they helpful? Do they welcome new contributors? Do they help you overcome difficulties or just dissuade you? These are very important questions because you will most likely participate in a project with at least thousands of lines of code. It can be overwhelming. If the people maintaining the project have no interest in helping you making the project grow, well, maybe you should look for a better place, especially if you are a beginner.

 

The second thing that you should consider is, do you actually care about the project you want to contribute to? I remember the first contribution I made, the CSS thing. Well, I can’t even remember the name… I think I found it on up-for-grabs and just found a easy enough  issue. People were nice, helpful and all but… I just didn’t really care about the repository. I just wanted to contribute. So, if you are a beginner in the world of Open Source and you want to contribute, find a project that you use all the time, or something that really excites you and emerges yourself in it.
Finally, and I often come back to this, you will have to overcome the imposter syndrome. Those projects seems like well-oiled machines. You’ll be scared to fuck things up. The thing is, Open Source NEEDS you, it NEEDS us. Developers who care about those things. Open Source is amazing, and we can all be a part of that. You don’t have to spend 20 hours a week on GitHub, solving issues. It’s all up to you. Whatever time you want to invest.

 

Be patient, you will find your place, your community. And you will make software better.

 

As for me, I decided to concentrate my effort on Calypso. The Javascript and API powered WordPress.com. I chose this project because it has everything I want. As a freelancer, making website with WordPress will become a big occupation of mine. As a NodeJS and React fan, Calypso is a project I would love to learn with and contribute to. You can find the repository here

 

I’m actually off to spend some time in the code to try solving an issue. It’s difficult, it will take time for me to figure out. But that’s the best part.

 

Have fun.
As always, feel free to share and comment.
Have a nice day.
Read more

Join me during my amazing adventures: Damien tries to become a freelancer !

I recently started taking freelancing seriously. A lot more seriously than I did in the past. I’m at a point where I’m considering becoming a freelancer full-time, as my primary (only) occupation. So, I decided to write about it. It will probably help me getting through the struggles I face more easily. Or maybe some of you considering making a move into the freelancer world will find some comfort in my words.

 

Anyway, a few things triggered this attraction to the freelancing world:
– the freedom the freelancer has (Yay!)
– the current difficulty I have to find a job in my area (not cool)
– my very own brother asked me to build an e-commerce website for him (that’s nice)

 

With that in mind, I talked myself into becoming a freelancer. But, because I’m also the type of person that can spend months researching and planning without doing anything, I decided to just go for it. I believe this is the best plan, even if I know I will fuck things up (I even already did… sort of).

 

So, one thing you might hear about freelancing is the importance of networks. Well, my brother is giving me my first gig after all. But, to be honest, my network is limited to my family. I don’t have any head start here. This means, I have to spend some time on online job boards to look for gigs.

 

I started with Upwork, and i saw a blog post on Medium. You may have read it. It really freaked me out. So, I crossed Upward for good. I am currently on PeoplePerHour, and it’s going good so far.

 

Okay, I know you are all waiting for the story where I fuck things up. Here it is. The very first job that I find, and so far the only one, was about adding some functionality on the EspoCRM. I never heard of it before, but the job talked about javascript and json. I thought, well this is for me. Oh boy was I wrong. The man was really nice, patient, took the time to explain to me what I needed to do.

 

I understood the requirements, the thing is, I never touched such a platform before. Now, that might not be so bad. So, I spent a few hours trying to wrap my head around a plausible solution. Nothing, no-thing. So, I tell the client that the job is a lot more difficult than I thought (urgh…). So, we talk to each other on teamviewer, explain it again, very patiently. And he even gives me other possible solutions that would work for me (!!!) . One of those seems doable, so he gives me two hours to tell him if I can do it or not.

 

I got further than the last try… But, I couldn’t get the functionality to work properly… What a awful feeling that somebody trust you to solve a problem, and you just can’t do it. So, I just told him he should probably find a freelancer more qualified than me. Yeah, not good..
The feeling is pretty terrible … But, I can get a few lessons from that adventure.

 

– Be honest. If I realised I couldn’t do it. I won’t lie to the client. Own it. Apologise for wasting their time and move on. It may happen again, but there is no excuse for lying about the abilities. I thought I could, I was wrong. I’m really sorry. Moving on to my next mistake.

 

– Be careful about what you are working with. I’m sure this will not be the last time I will deal with a platform, library or software I’m not used to, but I have to be realistic about what I can achieve with my current knowledge. I like the lesson in humility though. Be careful not confuse this with a feeling of worthlessness. It’s not true, and it really doesn’t help you. Dismiss this feeling.

 

– Don’t feel bad for too long about this. The client may yell at you, but upset, even give you a bad recommendation. Unfortunately, I think those things are part of the journey, at the beginning.

 

This is the end of my first chapter. I will keep learning about this freelancing stuff. I will keep learning about programming. I will learn how to get the right clients, clients whose problems I can solve with my skill set.

 

As always, feel free to share and comment.
Have a nice day.
Read more