Tuesday, September 15, 2020

Coda.io, Notion.so, Clickup.com and AirTables are they a new wave of software engineering tools?

I've been working with these tools for a couple of months now (almost a year i think) and i'm starting to realise that this is the way software engineering will work most of the time in a couple of years. The purists among you will say that it can't be true but let me digress.

These tools are so empowering and anyone can start using them.

When i say everyone, i only mean people who are minded on improving their workflow, the kind of people who used to build enormous excel worksheet to help with their tasks. Once they wrap their head around the way these new interfaces work, they will be able to build great apps and the best part is, we will all be able to learn from them!

Don't get me wrong however, we will always need software engineers to organise how stuff should work to increase efficiency and usability. But, getting a working software as a starting point enables so much more communication between developers and client. it also helps with quick prototyping!

Rapid prototyping is where it's at!

Imagine that you are with someone who pitches you an idea for an inventory management system that takes data from a form some user complete and then send an e-mail to a third party and remove that element from an inventory somewhere else. How much time would it take for you to prototype a software like that for a client if you were using React or any other technology really weeks? months? you'd need to setup a database, a frontend a backend...so much tedious work.. 😭

With Coda, an advanced user can probably build this within hours and then show it to their client and get their feedback right now! After getting their feedback, the solution is up to you, you can keep it on Coda OR you can use what you learned and implement it anywhere else you want. Your Coda document then becomes your Documentation!

But we'll all be loosing our jobs :( 

I think it already takes a special mindset to properly design a software, anyone can create a Coda doc but i think only software engineers can really polish an idea and make it work perfectly. So i don't think we will loose our job anytime soon!

Wednesday, March 28, 2012

Now on blogger, tracking android battery usage

I finally decided to let go of my domain name, since i always forgot to pay it before it expired. so here I am on a new blogger blog from which I imported all of my old stuff. First thing i have to say is that Blogger really improved it's web interface since the last time i used it, it is now a charm to use and makes me want to post more often (this is highly unlikely).

I am posting today because i think i was able to do something pretty impressive using no programming at all (as i said in an earlier post, i like to tweak around) but instead using Tasker and Google Spreadsheet. I've built a spreadsheet which enables me to track my android battery draining problem. That will hopefully in the end enables me to fix it!.

Without further due, here is what it looks like:
The columns from left to right are: the battery discharge in that period, the approximated discharge for one hour, the date of the record, and then the approximate amount of time I go with the battery in this situation (from 100% to 0%). This data is then used to create a graphic(okay i know i don't have enough data to make it look nice)
It is important to note that once all of this was created, i don't have anything to do and the graph will keep populating itself and stay up to date. Of course the nice part is how i was able to create this amazing utility from scratch without any programming involved!!!

1: Creating the Google Spreadsheet with a Google Form

This part was simple enough, i only had to create a single spreadsheet and then add a form to it (you can do it the other way around i guess) the important thing is that you want to create as much entry in your form that you wan column in your table (in my case, 4) the entry all need to be as "Text".

Then, once you have the form, you need to retrieve the names of the input HTML elements (to do this i used Google Chrome's inspect element functionality (in that case it was entry.2.single (i had 4 actually, going from 0 to 3))

you also need to retrieve the URL address to your form (i "blurred" some of mine)


2: Inputting the values in the form with Tasker
On the android phone, the task was a bit more complicated, i had to create a tasker profile that started when I disconnected my phone from a charger, and ended when i reconnected it.
For the profile to do what i wanted, I then needed to create a task that recorded the battery charge when entering the profile as well as the time, and then another task that did the same when leaving the profile, that is when i reconnected the phone to the charger.

On the profile exit task, i then needed to be able to send the data to Google data and that's where the Google form came in useful. Tasker has a really nice feature which makes it possible to interact with the Google form, it can actually send HTTP Post Requests! I found a really nice page that helped me with the creation of the request, but since this page was written, some things changed and the way to do it isn't exactly the same, i had to experiment a bit there, but you won't have to since i did it for you!
in the server:Port area, you need to add the address from the Google form, not including the "Https://" or last part of the address, that is "#gid=2" for me. I think it might differ for every form. in Data part, it needs to be entered in a similar fashion as in the screenshot, by entering a newline between each values. the %... are the variables recorded by the two tasks. 

3: Formatting the values from Tasker
this part was a pain and not fun at all. I'm a programmer at heart and this just felt like the wrong way to do stuff.
i had to use a complicated combination of split() function, time(), date(), if() and other stuff in order to get the number of hours the phone was disconnected, i had to take into account the date and the time, this way if the phone was disconnected one day and only reconnected the next, the number of hours would still be accurate.

4: Displaying the graph
after that, the creation of the graph was really simple, just had to use the appropriate function in Google Spreadsheet.

It's only been 2 days since i created this, so i am not entirely sure if it works correctly all the time, but i will report back when i know more.





Wednesday, October 5, 2011

New Home? time to play with some automation!

So Yeah, i know i don't write half as often as i'd like but hey! probably no one is reading my blog so...meh!

[caption id="" align="alignleft" width="181" caption="Tasker Task"][/caption]

I wanted to write today about a little automation i made, which i'm rather proud of. 2 months ago, i moved in with my girlfriend and now that i have a pretty powerful laptop that i use only rarely, i decided to have some fun with it, so i set it up as a little file/sharing/downloading/multi-purpose server. I no longer have a download restriction, so i download a lot of stuff on torrent. The only problem is that i don't want these torrent to be using all my bandwidth while i'm at home (the place where i live has a really shitty internet, even slower than 1 Mbps :( ). I use a lot of automation on my phone with Tasker, and i actually really like it, i set-up all kind of stuff like
automatically muting my phone while i'm in class (it checks on my calendar to know if i'm in a class!). Well anyway i thought to use the same kind of automation software for my computer and integrate the two!(yeah i know, i'm a programmer, i could just program the damn thing, but i like to hack around)

So i started by installing Eventghost, a software that can monitor all kind of events on your computer, from mouse move to software opening and... HTTP Requests!! :D. I needed my phone to communicate with my computer, so i thought i would probably need some network component and, HTTP is pretty simple so i settled with that. At first, since i don't have a static ip address at home, i wanted Eventghost to send to my phone the renewed ip address, it however turned out impossible since Evenghost doesn't permit to receive information from the GET requests, it justs create an event. Also, it would have required to have a permanent webserver on my phone (or something like that) and that would've probably drained a lot of battery. Anyway i started by creating the action to do when the HTTP request arrived, Eventghost would just open uTorrent, select all the torrent (really just typing CTRL + A) and then start or stop all the torrent. quite simple really!(i later found a more robust way to do it, more on that later).

So, now that everything was set-up to start and stop the torrents when some event was triggered, i went on my phone and created the trigger with Tasker. My tasker already has profile to know when i'm at home or not (i use the wi-fi SSID to know) so all i had to do was trigger an HTTP get request when i got home that would stop the torrent, and one that would start it when i left, this part was really easy. I also added the same kind of rule for when i went to sleep, my torrents would start when i went to sleep(or when i plugged my phone in) and stop when i woke up (when i unplugged my phone). So, there i had it, automatically starting and stopping torrents :D.

Now, fast-forward 2 weeks after-that, my setup doesn't work because my dynamic ip changed, and in the meantime i have had the change to discover another (REALLLY NIIIICCEE) automation software (which was developed at MIT) named Sikuli, so i decided to update the way i did things a little. I started with the part where Eventghost used to Start/Stop the torrents, i wrote a really small script to do it with Sikuli:

[caption id="" align="alignleft" width="371" caption="Sikuli Script"]Sikuli Script[/caption]

So this script does the exact same thing my event ghost actions did but it's a lot simpler and it uses image recognition to navigate (instead of me specifying the coordinates) so it's a lot more stable!I also had to change the way Eventghost  handled the event so that it would instead call the script generated by Sikuli.The other modification i did was to use dyndns to map a dynamic ip address to a static domain name.

[caption id="" align="alignright" width="225" caption="Evenghost final event"]Evenghost final event[/caption]

Friday, February 11, 2011

Multi-threading and the problem of race conditions

So, this week was the week where we needed to deliver the first prototype of our third year project. Until Wednesday, everything was going smoothly, without any bug or issues. But, when came the time to actually try the light client (the part of the software that would allow us to chat using a PDA), nothing was working as intended and I started to panic. Gabriel Royer, one of my teammate helped me out by going through every issue one at a time.  I needed i was panicked, my only responsability was a failure!


After one hour, i had to leave for work but not everything was solved so, I told myself that i would stay the night if needed to solve all this. However, while i was working, 2 of my teammates continued to debug and were able to solve every problem, me panicking really helped nothing.


In the end,  the problem wasn't even entirely my fault! Imagine my reflief, when the next day they told me that the problem was actually race conditions in the network that caused the application to not behave as intended on the PDA while it worked just fine in the emulator

Tuesday, February 1, 2011

Multi-Platform development and preprocessing.

Yesterday, while working for our school's third year project, I came across a problem, the code we were going to use and compile for 2 C# platforms (Asp.net 3.5 compact and Asp.net 4.0 normal) wasn't compatible for both platform. It took a hard time to realize since our compilator was giving an error like:
"I was waiting for an argument of type System.Net.IPAdress[], but received an argument of type System.Net.IPAdress[C:\System32]"

It took a while to actually figure out what was the problem. As it turns out, it was because i was trying to include files compiled for a not-compact version of Asp.net. The fix?(thanks to Julien Gascon-Samson on this one) incorporate the source files in a new project that would compile for a compact .net version. Once we did that, we tried recompiling and realized, there is a lot of different stuff on the compact framework, and that's where the pre-processing directives came into play.

We added every part of code that caused problem in a different "Utilities" static class which would help us code different behaviors on different platforms. The part to do that was quite simple:

[code lang="csharp"]

#if !PocketPC
return (int)e.SocketErrorCode;
#else
return e.ErrorCode;
#endif
[/code]
After i found out about this, everything became much easier, i was able to continue on implementing the lightweight client. What is the lightweight client is the title for another post..maybe!

Thursday, January 27, 2011

C#, Windows mobile 5.0, delegate and multithreading

This week was the 3rd week of school and it was also the week i started to code the 3rd year project! The project goal is in fact to add internet multiplayer functionality to an already existing racing game, after spending 2 weeks refining the software requirements and filling papers and papers of documentation, we finally got to the interesting part, the part where we actually learn something.

So I started the week by beginning the development of a chat interface which will run on a Windows mobile 5.0 PDA (old stuff dating from over 3 years ago). The interface part was pretty easy to do, Winforms is great for that, you just have to drag' n drop to create the layout and then you can start programming. I got all the layout working within 1 or 2 hours but then i wondered what was the best way to keep the information between the window, and also create the communication to the server. After talking to a collegue, i decided to simply create a "Session" object which will control the displayed page as well as the messaging service, I don't know if that was the best way to do it but i'm open to comments, i'm at school to learn.

So after that i started to think of the best way to receive messages from the server, i decided to go with starting a thread which would wait for the input from the server and then would go on notifying the interface to update itself. But to do that i needed to know 2 things: what is a delegate and how to start a thread! After 1-2 hours of reading tutorials, i got the hang of delegates and decided to continue on with the implementation. I created the thread which ran on an instance of the messaging object (yeah I know, that is probably not the best way to do it) and don't worry it didn't access any data, it was actually just waiting for an answer from the server. The real problem was calling the delegate to afterward, since it resided on the main thread, the function couldn't be accessed except by quitting the thread, so i had to learn to use the .Invoke function (which blocks the incoming thread). But finally, I was able to make the 2nd thread totally separate from the first one. Now the next step is to actually communicate with the server.

Tuesday, January 25, 2011

New domain name, and trying to post more often

Hello everyone!

I know there's probably nobody reading this, but i just wanted to say that i changed my domain registrar to Hover.com and, since godaddy kept my old domain name, i had to change the domain for my blog, it is now awesoftsomeware.net. No wonder you already figured that out since you are reading this but i just wanted to say a couple of things about godaddy.

This winter, i forgot to renew my domain with GoDaddy ( i was busy at the time and never found the time to do it) so now that i was ready to renew my domain name, they were charging me 90$ to renew it, that is an enormous amount to me so i just decided to move to a better registrar, hover.com. The domain name did cost me a little more (5$ more a year which isn't THAT much).  So i don't recommend godaddy to anyone!

So now that the blog is back up, I told myself that I would try to post at least one small post every week, I don't know if i'll be able to keep up with this, but I will definitely try.