I wrote a ReactJS App Called BIDI

Years ago I created a simple web application called Before I Die I... which was a public facing bucket list of things to do before you die.

Given that it was public facing and not much personalization, I took the site down to focus on other things.

Before I Die I - 2008

Years later, actually, 8 years later, I launched the site again. This time writing it with personalization in mind.

Before I Die I - 2016

The site is extremely simple. Since the "bucket lists" are private, every user must have a registered account to use it. In this case, I've decided that Twitter is the simplest method of authenticating a user with the least amount of data stored. In this case, all I am capturing is a session ID. No other personal information is being captured or stored.

Tech Stack

I decided to build the app in ReactJS. It needed to make use of "State" so I used Redux. For the database, storage, authentication and hosting I am using Firebase. This provides the app with with several options for it's future growth. Additionally, the app is running in real-time. In the future I will create a React-Native Mobile app to allow users to create and manage their lists on the go.

Check it out

Please go check out the project at https://beforeidiei.com and create your bucket lists today!

Years ago I created a simple web application called Before I Die I... which was a public facing bucket list of things to do before you die. Given that it was public facing and not much personalization, I took the site down to focus on other things. Before I Die…

Read More

Forbes.com 15000+ Javascript Errors on a Single Page

Today, while browsing the web, I landed on an article that raised an eyebrow, actually both eyebrows. Being a developer, I generally aim for achieving the highest performance possible on both the front end and the back end of, in this case, a web application.

Currently, the company I work for doesn't have a large engineering team, in fact, this is the smallest engineering team I've ever worked with, it's only me and a non-coding Product Manager. My colleague and I are responsible for three web properties in our network. This of course can be managed with a small team, provided that the platform(s) are similar in architecture and that the business and all stakeholders allow our team to work in iterations or weekly sprints. Software development is incredibly difficult without proper process. We've been pretty good at adhering this process across the company.

The properties we work on directly reach approximately four million visits each month. Of course, this is nothing compared to the amount of traffic that Forbes receives. With that being said, I find it difficult to swallow that companies like Conde Nast, Forbes, Vox, etc have so many issues with their sites from performance, usability, and overall quality assurance. Perhaps there are too many moving parts, but after seeing today's discovery, it's mind blowing how this happens in a production environment.

Forbes.com outputting over 15000+ JS errors:

As you can see from the video above, the errors are spinning out of control and they're incrementing by ~100 every second. Now, I haven't looked into the cost of this issue but regardless of what is happening, this isn't a pleasurable experience for me, the user.

After a quick comparison of major properties such as Google, Amazon, Yahoo, etc I found that none of them had a single JS error. Yahoo did have a few console warnings, but again, no red errors on any of these properties.

Perhaps the root cause of the issue I discovered this morning lies in the hands of publishers and advertisers. They're constantly making the attempt at tracking a user's behavior. If that's the case, you'd think that the company I work for would have a 15000+ JS errors on the site since we're often all running the same advertisements at any given time.

Wait, I just checked our biggest property and noticed that we don't have a single JS error or warning in the console. We're running ads, we're using DFP, we're allowing 3rd party ads to run.

This post isn't intended to bad-mouth Forbes or their respected team of developers. It's merely a post to help me and other developers better understand why these types of errors appear in production environments and hopefully help us understand the cost of allowing this to continue.

Today, while browsing the web, I landed on an article that raised an eyebrow, actually both eyebrows. Being a developer, I generally aim for achieving the highest performance possible on both the front end and the back end of, in this case, a web application. Currently, the company I work…

Read More

A good programmer is a lazy programmer...

They say "A good programmer is a lazy programmer..." - That may be true, however I would like to turn the negative into a positive and change the phrase to "A good programmer is an efficient programmer..."

I love patterns. I see them all the time. Throughout music, throughout code, throughout life in general. They're litterally everywhere and I am constantly on the lookout for them. Today I found myself repeating the same task/pattern over and over again and I was curious to see how much time it was actually taking up throughout my day.

Problem:

So the task at hand was to deploy 17 repositories to heroku at the same time and verify that they are deployed and running by simply viewing them in a browser. Pretty simple, right? Yes, simple is NOT the issue at hand, time is. Time is everything when it comes to getting work done, so be sure to use it wisely, as I'm pretty sure you will not get any of it back...

Solution:

Write a simple Shell script that will do the following:

Navigate to 17 local repositories

$ cd ~/path/of/my/local/repositories

Deploy each property to heroku / github / some cloud based git service (in my case, heroku)

$ git push heroku master

Then confirm the site is running and deployed by opening it physically in Google Chrome like so

$ open -a Google\ Chrome http://nameofmyawesomedomain.com

And finally, (optionally) print out some console confirmation that the script completed

$ echo "Deploy complete"

My Script

(Most likley this will not help you, but have a look anyway...)

#!/bin/bash

echo "Deploying admityouhaveaproblem..."  
cd ~/Heroku/admityouhaveaproblem.github.io && git push heroku master  
open -a Google\ Chrome http://admityouhaveaproblem.com  
echo "Deploy complete"

echo "Deploying ColorMyMusic..."  
cd ~/Heroku/ColorMyMusic.github.io && git push heroku master  
open -a Google\ Chrome http://colormymusic.com  
echo "Deploy complete"

echo "Deploying beforeidiei..."  
cd ~/Heroku/beforeidiei.github.io && git push heroku master  
open -a Google\ Chrome http://beforeidiei.com  
echo "Deploy complete"

echo "Deploying convoclothing..."  
cd ~/Heroku/convoclothing.github.io && git push heroku master  
open -a Google\ Chrome http://convoclothing.com  
echo "Deploy complete"

echo "Deploying getanintern..."  
cd ~/Heroku/getanintern.github.io && git push heroku master  
open -a Google\ Chrome http://getanintern.com  
echo "Deploy complete"

echo "Deploying getgearly..."  
cd ~/Heroku/getgearly.github.io && git push heroku master  
open -a Google\ Chrome http://getgearly.com  
echo "Deploy complete"

echo "Deploying hissio..."  
cd ~/Heroku/hissio.github.io && git push heroku master  
open -a Google\ Chrome http://hiss.io  
echo "Deploy complete"

echo "Deploying jogbuy..."  
cd ~/Heroku/jogbuy.github.io && git push heroku master  
open -a Google\ Chrome http://jogbuy.com  
echo "Deploy complete"

echo "Deploying kissvote..."  
cd ~/Heroku/kissvote.github.io && git push heroku master  
open -a Google\ Chrome http://kissvote.com  
echo "Deploy complete"

echo "Deploying kywrd..."  
cd ~/Heroku/kywrd && git push production master  
open -a Google\ Chrome http://kywrd.com  
echo "Deploy complete"

echo "Deploying latched..."  
cd ~/Heroku/latched.github.io && git push heroku master  
open -a Google\ Chrome http://getlatched.com  
echo "Deploy complete"

echo "Deploying madstory..."  
cd ~/Heroku/madstory.github.io && git push heroku master  
open -a Google\ Chrome http://madstory.com  
echo "Deploy complete"

echo "Deploying meetsme..."  
cd ~/Heroku/meetsme.github.io && git push heroku master  
open -a Google\ Chrome http://meetsme.com  
echo "Deploy complete"

echo "Deploying neighborhoodly..."  
cd ~/Heroku/neighborhoodly.github.io && git push heroku master  
open -a Google\ Chrome http://neighborhood.ly  
echo "Deploy complete"

echo "Deploying picksomeone..."  
cd ~/Heroku/picksomeone.github.io && git push heroku master  
open -a Google\ Chrome http://picksomeone.com  
echo "Deploy complete"

echo "Deploying rehearseio..."  
cd ~/Heroku/rehearseio.github.io && git push heroku master  
open -a Google\ Chrome http://rehearse.io  
echo "Deploy complete"

echo "Deploying youmeyoume..."  
cd ~/Heroku/youmeyoume.github.io && git push heroku master  
open -a Google\ Chrome http://youmeyoume.com  
echo "Deploy complete"  

Save the above as deploy_script.sh and then set the permissions to be executable:

$ chmod +x ./deploy_script.sh

Next run the script:

$ ./deploy_script.sh

Conclusion

Now, before writing this simple Shell script, this process was taking up about an hour of my time each and every day (I'm doing the 365 Days of Open Source Contributions). Clearly this was not something that I enjoyed, nor was it even remotely sustainable.

By writing a script, I can now deploy code in less than 30 seconds.

Video Proof

Save yourself some time and write shell scripts locally, or possibly consider using Alfred Mac App.

Happy coding!

They say "A good programmer is a lazy programmer..." - That may be true, however I would like to turn the negative into a positive and change the phrase to "A good programmer is an efficient programmer..." I love patterns. I see them all the time. Throughout music, throughout code,…

Read More

How to Manage Time With 10 Tips That Work

Chances are good that, at some time in your life, you've taken a time management class, read about it in books, and tried to use an electronic or paper-based day planner to organize, prioritize and schedule your day. "Why, with this knowledge and these gadgets," you may ask, "do I still feel like I can't get everything done I need to?"

The answer is simple. Everything you ever learned about managing time is a complete waste of time because it doesn't work.

Before you can even begin to manage time, you must learn what time is. A dictionary defines time as "the point or period at which things occur." Put simply, time is when stuff happens.

There are two types of time: clock time and real time. In clock time, there are 60 seconds in a minute, 60 minutes in an hour, 24 hours in a day and 365 days in a year. All time passes equally. When someone turns 50, they are exactly 50 years old, no more or no less.

In real time, all time is relative. Time flies or drags depending on what you're doing. Two hours at the department of motor vehicles can feel like 12 years. And yet our 12-year-old children seem to have grown up in only two hours.

Which time describes the world in which you really live, real time or clock time?

The reason time management gadgets and systems don't work is that these systems are designed to manage clock time. Clock time is irrelevant. You don't live in or even have access to clock time. You live in real time, a world in which all time flies when you are having fun or drags when you are doing your taxes.

The good news is that real time is mental. It exists between your ears. You create it. Anything you create, you can manage. It's time to remove any self-sabotage or self-limitation you have around "not having enough time," or today not being "the right time" to start a business or manage your current business properly.

There are only three ways to spend time: thoughts, conversations and actions. Regardless of the type of business you own, your work will be composed of those three items.

As an entrepreneur, you may be frequently interrupted or pulled in different directions. While you cannot eliminate interruptions, you do get a say on how much time you will spend on them and how much time you will spend on the thoughts, conversations and actions that will lead you to success.

Practice the following techniques to become the master of your own time:

  1. Carry a schedule and record all your thoughts, conversations and activities for a week. This will help you understand how much you can get done during the course of a day and where your precious moments are going. You'll see how much time is actually spent producing results and how much time is wasted on unproductive thoughts, conversations and actions.

  2. Any activity or conversation that's important to your success should have a time assigned to it. To-do lists get longer and longer to the point where they're unworkable. Appointment books work. Schedule appointments with yourself and create time blocks for high-priority thoughts, conversations, and actions. Schedule when they will begin and end. Have the discipline to keep these appointments.

  3. Plan to spend at least 50 percent of your time engaged in the thoughts, activities and conversations that produce most of your results.

  4. Schedule time for interruptions. Plan time to be pulled away from what you're doing. Take, for instance, the concept of having "office hours." Isn't "office hours" another way of saying "planned interruptions?"

  5. Take the first 30 minutes of every day to plan your day. Don't start your day until you complete your time plan. The most important time of your day is the time you schedule to schedule time.

  6. Take five minutes before every call and task to decide what result you want to attain. This will help you know what success looks like before you start. And it will also slow time down. Take five minutes after each call and activity to determine whether your desired result was achieved. If not, what was missing? How do you put what's missing in your next call or activity?

  7. Put up a "Do not disturb" sign when you absolutely have to get work done.

  8. Practice not answering the phone just because it's ringing and e-mails just because they show up. Disconnect instant messaging. Don't instantly give people your attention unless it's absolutely crucial in your business to offer an immediate human response. Instead, schedule a time to answer email and return phone calls.

  9. Block out other distractions like Facebook and other forms of social media unless you use these tools to generate business.

  10. Remember that it's impossible to get everything done. Also remember that odds are good that 20 percent of your thoughts, conversations and activities produce 80 percent of your results.

Source: http://www.entrepreneur.com

Chances are good that, at some time in your life, you've taken a time management class, read about it in books, and tried to use an electronic or paper-based day planner to organize, prioritize and schedule your day. "Why, with this knowledge and these gadgets," you may ask, "do I…

Read More

Shutting of my LAMP and turning on my MEAN...stack

I've been a PHP guy for a long time. Like all computer languages, I've learned through trial and error. PHP just sort of fell on me and I hung out with it because it was well documented, open source, most hosting companies supported it, most of my friends used it. For me, PHP was understood.

PHP Frameworks. Over the years I started thinking of finding a silver bullet. Something that I could quickly understand and hit the ground running and PHP Frameworks was that silver bullet for me. In the past I've tried Yii, Codeigniter, FuelPHP, CakePHP, Lithium, Kohana, Laravel, PhalconPHP, and about 30 more that are worth mentioning, I'm just not going to because from here on out I am moving over to a MEAN (Mongo + ExpressJS + AngularJS + NodeJS) stack... well actually for me at the moment I'm skipping AngularJS and just using a MEN Stack.

What generally takes me one week to do in PHP is now taking me two hours in NodeJS and it is soooo much lighter and beautiful. Time saver! Lightbulbs! Inspiration! New Chapter!

I still love you PHP, but I'm shutting down the LAMP stack and getting seriously MEAN!

I've been a PHP guy for a long time. Like all computer languages, I've learned through trial and error. PHP just sort of fell on me and I hung out with it because it was well documented, open source, most hosting companies supported it, most of my friends used it.…

Read More