Time to Freelance with TopTal

I’ve been doing software development for 5-10 years (many of those first years were devoted to hobby work and side projects. The past 5-6 have been more dedicated to perfecting my craft. My major focus has been web development including wordpress and sugar crm, and custom scripts built on laravel, and ruby on rails.

I’ve been in Utah for about 2 years now, and have found employment to be highly competitive. Which is why I’ve decided to give TopTAL a chance and get started in freelancing.

My favorite frameworks are: Laravel, Ruby on Rails, and if I need to go mobile either MeteorJS or IonicFramework. I also enjoy angularjs for a smooth frontend experience, but have lately been also playing around with ReactJS a bit, though I do tend to be a bit more backend (server code), rather than front end (js/client-side).

As an entrepreneur I’ve also started many side projects, though many haven’t seen the light of day, but each one has helped me grow and progress as a developer. It’s through building stuff and breaking things that you get better at the craft of programming.

Recently, I’ve put in a number of bids on odesk, and freelancer.com but it’s hard to find good rewarding projects on those sites, and most people are looking for developers from countries like India where they will accept a lot less per hour, than to pay U.S. wages. I enjoy freelance work because I can work when I want (which is often after midnight when the house is quiet and everybody is asleep, it pays well if you get the right jobs, and I can work on different types of projects.

Lately I’ve been doing some research and found TopTal.com and I’m finding it to be an awesome resource for developers. Only the absolute BEST freelancers work at TopTal, they get thousands of applications, and only about 3% get accepted, and they work for major companies like AirBNB. They also have great training posts and topics on their blog, and both long and short term work, and they promise to provide working opportunities, so you don’t have to spend all day looking and bidding on projects and instead can just work.

I’ve just recently began the projcess to join their Web Engineer Group, and I really hope I make it. Wish me luck!

It's only fair to share...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on StumbleUponShare on RedditBuffer this pageShare on TumblrFlattr the author

FreeCodeCamp Bonfire Challenge Solutions

In order to help land that coding job I’ve been dreaming of, and since I’m currently unemployed, I thought I’d use spare time where I’m not coding on something cool, or applying for dev jobs to work on my craft.

Beginner Algorithm Scripting

Here are gists from the Bonfire Challenges:

Free Code Camp :: Bonfires

1. Bonfire: Meet Bonfire

2. Bonfire: Reverse a String

3. Bonfire: Factorialize a Number

4. Bonfire: Check for Palindromes

5. Bonfire: Find the Longest Word in a String

6. Bonfire: Title Case a Sentence

7. Bonfire: Return Largest Numbers in Arrays

8. Bonfire: Confirm the Ending

9. Bonfire: Repeat a string repeat a string

10. Bonfire: Truncate a string

11. Bonfire: Chunky Monkey

12. Bonfire: Slasher Flick

13. Bonfire: Mutations

14. Bonfire: Falsy Bouncer

15. Bonfire: Seek and Destroy

16. Bonfire: Where do I belong

Intermediate Algorithm Scripting

1. Bonfire: Sum All Numbers in a Range

2. Bonfire: Diff Two Arrays

3. Bonfire: Roman Numeral Converter

4. Bonfire: Where art thou

5. Bonfire: Search and Replace

6. Bonfire: Pig Latin

7. Bonfire: DNA Pairing

8. Bonfire: Missing letters

9. Bonfire: Boo Who

10. Bonfire: Sorted Union

11. Bonfire: Convert HTML Entities

12. Bonfire: SpinalTap Case

13. Bonfire: Sum All Odd Fibonacci Numbers

14. Bonfire: Sum All Primes

It's only fair to share...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on StumbleUponShare on RedditBuffer this pageShare on TumblrFlattr the author

How to keep tables uncluttered by using profiles for each user type in Ruby on Rails

This is a continuation of my STI / Single Table Inheritance article: “How to use multiple User types with the same model in Rails aka STI or Single Table Inheritance

To keep your tables less cluttered and better normalized, I do recommend creating profile tables for each user type. What I did is this for my student’s example:

I have a student_profiles table with things like skype_username, birthdate, etc. To set this up You’ll want to do your migration.

Then we edit the Student model like so:

Now you can keep your user table and class more minimal and separate everything out into their own model. I also recommend putting all of these folders in models/users folder. To do that though you will need to edit config/application.rb and add the following line:

Thinking ahead you may want to group more models together, especially if you have a large number of models and tables, to do that you’ll just need to add a new line the same thing as above, just change the last part of the path to match the path to the folder with your models, and you should be good to go!

 

It's only fair to share...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on StumbleUponShare on RedditBuffer this pageShare on TumblrFlattr the author

How to Use Multiple User Types (STI or Single Table Inheritance) with the Same Model in Ruby on Rails

Lately, I’ve been building a complex CRM for music teachers to manage students, invoicing, etc… It’s gotten a bit complicated, and I myself have learned a lot from this side project. One important thing I’ve learned is STI, or Single Table Inheritance. Basically, this lets you easily have sub models with their own intricacies, relationships, etc so you don’t clog up the main user class, but they all use the same table, and are easier to modify on their own.

I have admin.rb, student.rb, parent.rb, and teacher.rb files with classes to go with them…

I’ve built this all using Sorcery for the backend, but you can use devise, or whatever else floats your boat.

The first step is creating a “type” attribute on the users table. This is required by STI to know which type of user we’re dealing with. I’m going to assume you already have your user authentication system all setup.

Next you’ll want to create a subclass. For this example we’re just going to use Student.

When we create this, we also need to make sure that when the “type” attribute is set it’s always titleized. You’ll get errors and have issues if for instance the user.type was set to “student” and not “Student”. Case matters in this case.

Example:

 

 

Now, just make sure each user has a type, or perhaps have some sort of fallback, or default type as well. Then whenever you query Student.all or Teacher.all you’ll be pulling data out of the users table, but only get back Student and Teachers.

Next you may want to checkout my article on: How to keep tables uncluttered by using profiles for each user type.

More good articles on Single Table Inheritance / STI:

 

 

It's only fair to share...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on StumbleUponShare on RedditBuffer this pageShare on TumblrFlattr the author

Now Shipping Glitter and Poop to your Enemies, Friends, Grandma!

Now shipping Glitter to your Enemies
GlitterandPoop.com : Ship Glitter to your Enemies

If you’re mad that the ShipYourEnemiesGlitter.com site is gone, down, and being sold to the highest bidder before you could get your order in – don’t fret. Newest site on the block promises to offer many new, and great features to set itself apart from the rest. Ship Glitter for only $7.99!

GlitterAndPoop.com — It’s like a unicorn shat all over your house.  Get glitter sent to your friends and enemies. Coming soon, you can ship poop too! There’s even a fun game where you can guess who sent you glitter and send a revenge package to them.

I built glitter and poop over 3 days using Laravel, and a Sleek Bootsttap theme I found for free. I love the concept and hope you do too! Looking to add other prank as a service type services in the future too!

It's only fair to share...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on StumbleUponShare on RedditBuffer this pageShare on TumblrFlattr the author

Why the Singularity proves Time Travel Impossible

 

time travel possible

The fact is that Ray Kurzweil is a mad genius, he is definitely mad, and he’s definitely a genius, and some of his predictions are quite scary.

Nothing is more scary, and exhilarating as the thought of a technological singularity – the point in time where we–mankind become unecessary. For millenia, since the dawn of history WE humans have propelled ALL scientific discoveries, all progress has been a result of human intellect, and that intellect is what separates us from all other creatures in the world, and maybe even the universe(until proven wrong).

We have the ability to build, change, and disrupt the world around us, and even the universe in great and profound ways. Yet, it is predicted that there is an 80% chance that by 2040 we will have entered the post-human era. What is this? When a super-intelligent AI computer/robot eclipses the intellect and brain processing abilities of a human.

This sounds amazing, fascinating, and like science fiction, but let me ask you does warp drives, wormholes, time travel, blackholes(in a lab), cold fusion, lasers in warfare, space elevators sound like science fiction? What about a brain chip that can control a robot exoskeleton as an extension of the brain, –or a prosthetic device w/ the ability to send REAL touch back to the brain of the user — or printable kidneys? — YET many of these are not only being researched, but some are now a reality!

We are living in an AMAZING era where science fiction ceases to be fiction, and becomes part of reality. This gives me a huge noody™ (nerd woody), and scares the shit out of me at the same time. When we arrive at the point in history where a machine can do everything a human can, and do it better, we become the animal – a nuisance that takes up space, and no longer will we give way to advances in technology, because technology will be able to create new technology faster than we can conceive, research, and develop said technology. In other words, there is no point in us developing or building anything new after this point, as machines will be able to do it at a much faster speed, meaning we may probably not put as much value on education -what is the point when we don’t need to know anything because machines know it all?

Which brings me to time travel, IF time travel were possible it is postulated that we would be surrounded by time travellers, but they would mostly be disguised probably to avoid detection and possible paradoxes, BUT we are closer to AI than time travel, and if time travel is possible at all – it will be an yAI that discovers it, meaning that it will be robot’s that come back in time, and they would surely bring future technology backwards in time, in order to propel future growth even faster. Imagine giving a smartphone to someone in 1890 and all the engineering manuals upto 2010 – then repeating with even more data, and so forth.. .. or if time travel were possible wouldn’t there be a high likely-hood that something like the terminator would have already played out?

This is just thoughts and speculation of course, — there’s also the possibility that AI computers do discover time-travel but have a directive NOT to go back in time before the invent of the machine because doing so – and causing some sort of ‘havoc’ on mankind, would essentially wake up mankind to that fact that we’re going to destroy ourselves if we go further, and thus we stop all research on AI, and time travel – – yet, if we live in a multi-verse where that one robot from the future that came back to destroy us before we even discover how to make it — would keep on existing because it comes from a parallel world where it was created even though in this one, that will not happen, but if all time is linear w/out multi-verses or deviations then the question lies – if you remove a piece of history that leads to your creation, and you are currently residing in the history — do you then disappear instantaneously and cease to exist – and if you do cease to exist, how did you remove the piece of history since you weren’t created to do so…. — I guess that’s the nature of a paradox, and would something like this unravel time and space?

Or, what if we are as some scientists are postulating – a scientific computer simulation, at which point –creation of a paradox would not end the universe, but cause the simulation to ‘error out’ and crash. So, to us it will be end game, to the other us – doing the research, it’ll just be a temporary set-back needing further debugging.

The more I think about these topics, the more I feel that you almost need a super-intellect to even understand all the complexities that our future holds, and as I said from the start of this post, I am both exhilarated, and scared shitless at the same time, I say bring it, if we are to be destroyed, let’s just get it out of the way because there’s nothing to stop it – hopefully all generations of AI keep in mind Asimov’s 3 laws of robotics, and maybe we will survive this singularity, or maybe WE will become the machines, and instead of being out-paced by technology actually become the technology that replaces us in the world.

It's only fair to share...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on StumbleUponShare on RedditBuffer this pageShare on TumblrFlattr the author

How to Use Local Environment as Default in Laravel Artisan CLI

I have to say, I absolutely LOVE Laravel – everything about it.

One of my favorite features is the ability to separate your app into local/production versions.

I use a lot of packages for development, that I just don’t need on my production version of the app. How do I resolve this? By using two different environments w/ different App.php configs. Read my tutorial on this here.

You might find that this only works for your app when running it in the browser. Here’s how to make sure that the local environment is ALSO set for command-line e.g. Artisan and Tinker.

One option of course is to do:

But who wants to write –env=local after EVERY artisan command? I am a pragmatist and believe in using technology to my advantage. This is great when needing to switch back and forth for a minute, but when doing it all the time you need an alternative.

next add “PatrickPC” to bootstrap/start.php

Now artisan should run w/ local environment as default when on this machine, let’s test it:

Got questions? Leave a comment!

It's only fair to share...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on StumbleUponShare on RedditBuffer this pageShare on TumblrFlattr the author

How to setup Local and Production environments on Laravel

One great feature of Laravel is how easy it is to setup local and dev environments.

Why would you want separate environments?

  • Require separate packages for dev, and production.
  • Less bloat / potential for errors on production.
  • Turn off debug on production.
  • Special config options for local vs production.
  • etc…

Next we simply create a new folder at : App/config/local/

If you create a App.php file -this file will override the global App.php in the parent directory while working in the local environment. So you can add different providers/facades to this local version and not mess up the production version.

It's only fair to share...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on StumbleUponShare on RedditBuffer this pageShare on TumblrFlattr the author

Gollum Covers Taylor Swift

I absolutely LOVE Gollum, my favorite character on Lord of the Rings, and probably one of the BEST pieces of acting I’ve ever seen. I love the way Andy Serkis does the split personality between Gollum and Shmeagol, it’s quite amazing. He’s a true acting genius. Also loved him as Caesar in Rise of the Planet of the Apes.

Anyhow, today I found this really amazing facebook video Gollum Covering a Taylor Swift Song–it’s freakin’ hillarious… The guy who made this is also a freakin’ genius..

Here watch it and let me know your thoughts, if you like it please share the video on facebook, like, and leave a comment.

http://bit.ly/ZDzXSw

Lyrics:

Once upon a time
A few mistakes ago
We were in our cave
You got us alone
You found us
You found us
You found us us us us (gollum)

We thought that you were food
You didn’t like that
So we played a game
But when we turned our back
You tricked us
You tricked us
You tricked us us us us us uuuhhhsss

Now it’s long gone
We were stupid to trust
And we realize
The blame is on uuussss

Cause we knew you had precious when you walked in
So shame on us now
Our cries echo through the Misty Mountains
Since you came around
Cause we knew you had precious when you walked in
So shame on us now
Our cries echo through the Misty Mountains

Now we’re lying in the cold hard cave
OH, OH, PRECIOUS, PRECIOUS, PRECIOUS!
Black Riders chased us down
They never saw us cry
Okay maybe we cried

But we had to stay alive
For the Precious
The Precious
The Preciou ou ou ou ou ouusssss

We heard you moved on
From birdses in the trees
They saw you with the Hobbits
Somewhere to the East
So we eats those birds
We eats those birds
We eats those birds birds birds birds birdseeeess

It was long gone
We were stupid to trust
And we realize
The blame is on uuussss
Cause we knew you had precious when you walked in
So shame on us now
Our cries echo through the Misty Mountains
Since he came around
Cause we knew you had precious when you walked in
So shame on us now
Our cries echo through the Misty Mountains

Now we’re lying in the cold hard cave
OH, OH, PRECIOUS, PRECIOUS, PRECIOUS!
Then the saddest fear comes creeping in
That you never loved us, or him, or anyone
Or anything

Oohhhhhhhhhh

We knew you had precious when you walked in
So shame on us now
Our cries echo through the Misty Mountains
Since he came around
Cause we knew you had precious when you walked in
So shame on us now
Our cries echo through the Misty Mountains

Now we’re lying in the cold hard cave
We knew you had precious when you walked in
Precious, Precious, Precious
We knew you had precious when you walked in
Precious, Precious, Precious

It's only fair to share...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on StumbleUponShare on RedditBuffer this pageShare on TumblrFlattr the author