Skip to main content

Posts

Showing posts from 2016

Don't feed the zombies!

Sometimes, the best way to help the startups you care about is to let them die from starvation. We all know entrepreneurs with terrible ideas, seeking validation, recognition and cash. I was (am?) one of them, and looking back at my startup journey I wish that I hadn't receive the awards and investment that kept me working on the wrong idea for months (although it was a great learning experience). If you really care about your startup friends, I encourage you to follow these recommendations: Feedback / Surveys.  If you are asked to provide feedback about an idea, don't be accommodating. Tell them what you really think, even (especially) if it is not nice. A good entrepreneur will be grateful to learn more about your real needs. Perhaps you are simple not part of their target market. Install my app / Like my page.  If you don't really like a project, why do you have to install their app, register as a user or like their Facebook page? This will inflate their tr

10 things that I learned from organising a meetup

For the last 9 months I have co-organised and presented  Machine Learning Dublin , a meetup group started by  ADAPT Centre that rapidly grew from 0 to 1350 members. Now that I have stepped back, I want to share ten lessons that I learned through this wonderful experience. Form a great team.  The effort to organise a meetup is largely underestimated: it can easily take you 30 hours per event. Make sure you have a good team of at least 4 people and assign responsibilities: finding speakers, sponsors and venues, presenting, managing website and social media, registration desk, etc. Secure great venues.  The event space plays a fundamental role in the success or failure of a meetup. Secure nice-looking event spaces in the city centre that are easy to find by the attendees. Some topic-related companies, startup incubators and co-working spaces might offer their facilities for free. Be picky about speakers. Select 2 or 3 good speakers per event that engage with the audience and y

Website Load Testing with Apache JMeter

I was exploring different load testing tools in order to make sure that the Ethics Canvas platform would resist peaks of up to 100 users  signing in every 10 seconds , when I came across Apache JMeter . JMeter is a robust Java-based open-source tool that allows users to test performance both on webservices, web dynamic languages, Java Objects, databases and queries, FTP servers, etc. Running JMeter (Linux): Download Apache JMeter Extract the content from the compressed file From the Terminal, navigate into the apache-jmeter/bin Type ./jmeter and it will open the Java app (make sure you have Java installed) Running load tests on Ethics Canvas: Right-click on Test Plan -> Add -> Threads -> Thread Group On Number of Threads we enter the desired number of users: 100 On Ramp-Up Period we enter the desired test duration: 10 Right-click on Thread Group -> Add -> Sampler -> HTTP Request On Server Name we type ethicscanvas.org On Path

The Ethics Canvas

In 2008, Alexander Osterwalder presented an innovative tool called " Business Model Canvas " (BMC) that aimed to help entrepreneurs to capture the fundamental business knowledge about their project, and bring about pivots in order to make the business model more consistent and successful.  Since then, the BMC has helped over 5 million entrepreneurs increase the value that they provide to their users, and find a sustainable model. In 2015, a group of researchers from ADAPT Centre  started using a similar approach in order to detect at early stage all the ethical implications of a project, and help entrepreneurs and researchers pivot their idea in order to minimise these issues. If you think about new technologies such as biotech, AI, IoT, VR, biometrics, blockchain, 3D printing,... they all bring great advancements for humanity, but they have some potential ethical issues that could have a catastrophic impact. After some months of hard work and experiments, we h

How to prevent directory listing in Apache 2

If you are using Apache 2 as a web server on Linux, you might have seen that directory listing is enabled by default . Directory listing allows anyone to view all the files and subfolders contained in a specific folder, by entering the URL on the browser. The image below is an example of the directory listing that you could see when you visit the fictitious URL www.example.com/images . This might affect some privacy protection rules. In order to disable directory listing, you just need to type the following command from the terminal: sudo a2dismod autoindex

Configure your .com website on Apache Server

If you want to run your website from an Apache2 server  and make it available from yourdomain.com , you can follow these steps: 1) Go to /var/www/ and copy the root directory of yourproject (or clone the repository from Git). 2) Create a new file on /etc/apache2/sites-available/ named yourdomain.com .conf with this content:     <VirtualHost *:80>         DocumentRoot "/var/www/ yourproject "         ServerName www. yourdomain.com         ServerAlias yourdomain.com     </VirtualHost> 3) Activate the website with the command: sudo a2ensite yourdomain.com 4) Find your public IP with the command: sudo ifconfig (it should appear as innet_addr ) 5) From your domain management site, edit the A DNS record for ' @ ', pointing now to your public IP address 6) From your domain management site, edit the CNAME DNS record for ' www ', pointing now too ' @ ' 7) Wait a couple of hours until the DNS changes are propagated. Your webs

How to allow MySQL remote connections

If you have a MySQL database running on your server, and you want it to accept remote connections, you have to follow these steps: 1) Allow MySQL to listen to all interfaces (default is the loopback interface only): sudo vim /etc/mysql/my.cnf You replace this statement: bind-address            = 127.0.0.1 by this one: bind-address            = 0 .0.0.0 2) Create a new database use with all privileges granted (you shouldn't allow remote connections with the root user): mysql -u root -p -h 0.0.0.0 mysql> CREATE USER ' yourusername '@'localhost' IDENTIFIED BY ' yourpassword '; mysql> GRANT ALL PRIVILEGES ON *.* TO ' yourusername '@'localhost'  WITH GRANT OPTION; mysql> CREATE USER ' yourusername '@'%' IDENTIFIED BY ' yourpassword '; mysql> GRANT ALL PRIVILEGES ON *.* TO ' yourusername '@'%'  WITH GRANT OPTION; 3) Test the connection from a different network (make sure

Big Data and Ethics

Big Data is not precisely a new trend, but the latest advances in computing capacity have set the stage for its rise. The hype and the reality of these new developments raise ethical issues that demand deliberation. I came across an interesting white paper titled Perspectives of Big Data, Ethics, and Society , by the Council for Big Data, Ethics, and Society , that raises concerns about the obsolescence of the Common Rule (rule of ethics regarding research involving human subjects). The Common Rule assumes that research methods using existing public datasets have no risk to individual human subjects. However, new data science techniques can create composite pictures of persons from different datasets that might be innocuous on their own but produce highly sensitive personal insights when combined . Since the informed consent occurs at the point of collection, before any data is used, it is not always possible to explain to the subject all the risks that the uses of his data

How to enable command autocomplete and history on Linux

After installing some Linux distributions such as Debian, you might find that the command autocomplete  and command history are not enabled by default, so that you cannot use TAB or the cursor movement keys from the command line. What is actually happening is that the shell you have in some distributions by default is sh , which is tedious to use. However, you can easily switch to a superset called  bash , which incorporates these two features that will save you a lot of time. This is how you do it. 1) Type the command chsh 2) Type your password 3) Type as login shell: /bin/bash 4) Logout and sign in again. Autocomplete and command history should be enabled now.

How to jump to time offsets in HTML5 video

Let's say that you have a 30-minute WEBM video file, from which you just want to play the following video segments , jumping from one to the other automatically  without interruptions : [00:01:25.00 - 00:02:25.00] -> from second 85 to 145 [00:11:40.00 - 00:11:55.00] -> from second 700 to 715 [00:20:26.00 - 00:21:07.00] -> from second 1226 to 1267 [00:26:11.00 - 00:28:01.00] -> from second 1571 to 1681 To increase the complexity, let's think that you have these video segments in a PHP variable $arrayVideoSegments  (normally the case if they were retrieved from the database).   $arrayVideoSegments[0]->startTime = 85   $arrayVideoSegments[0]->endTime = 145   $arrayVideoSegments[1]->startTime = 700   $arrayVideoSegments[1]->endTime = 715   $arrayVideoSegments[2]->startTime = 1226   $arrayVideoSegments[2]->endTime = 1267   $arrayVideoSegments[3]->startTime = 1571   $arrayVideoSegments[3]->endTime = 1681 The

How to install a SSL certificate in Tomcat 8

If you want to run your web app on Tomcat 8 (Linux) under the HTTPS umbrella, these are the steps that you need to follow. In this example we will use test domain example.com : 1) Purchase an SSL certificate from trusted provider. Price ranges from $5 to over $100 per year. 2)  SSH to your Linux server and, from your personal directory /home/ youruser / type the following command in order to generate the private key : keytool -genkey -alias tomcat -keyalg RSA -keystore example .keystore 3)  You will be asked some questions. The most important ones are the keystore password (let's assume it is yourPassword ) and the First and last names , which is actually misleading because you need to enter the domain name: example.com . 4) Generate your local Certificated Signing Request (CSR) with this command: keytool -certreq -keyalg RSA -alias tomcat -file example .csr -keystore example .keystore 5) Open the CSR file that you have just generated with  vim exampl