Sunday, November 4, 2012

Project Euler in Ruby, revisited

I was thinking about it tonight, about life and my desire to do more with my time.  Andrew, a buddy at work who also happens to be a Scrum coach talks about using all of the time in a given day.  He talks about training for skiing as he is walking around the campus, about his own business ventures and the evening when he does that, about reading while he is traveling and using all of his time for productive tasks.  I'd really like to accomplish the same.  Dunno if I will ever utilize my time to that degree, but spending a little more time programming and studying math each day is a great start. 

As I was thinking about these things the other day, I thought of something significant.  That you are what you do after-hours, not during the day.  When you have nothing to do (relatively speaking), whatever you do end up doing, is what you are.  So I come home, and usually chill the rest of the evening.  Yes, I spend time with Stepheni and Ephraim, but beyond that my time isn't filled with the things that I would like it to be.  So, "whatever" to my job title not being what I want it to be, I'm gonna do what I want and know I can do at home and be a better example to my loved ones and my friends. 

With that in mind, I want to revisit the Project Euler problems in Ruby.  Ruby is a great language, built on C, and fairly easy to work with.  I am choosing it because there is a great community online for it and I won't get too hung up in the syntax, while focusing on the math behind these problems. 

The best story that I have heard of for optimization, is the one about Gauss and how he showed up his teacher by summing the numbers 1-100 by using a formula rather than 1+2+3+...+99+100. 

Looking at the numbers he saw that 1+100=101, 2+99=101, 3+98=101, etc.  And thereby came up with the formula (n*(n+1))/2, where n is the number you are summing to from 1.  Using this tool he was able to not only finish the task in a few minutes rather than a few hours, he was also able to do it correctly. 

With that in mind, optimization deals with taking a task and making it as fast as it possibly can be, or at least faster than it previously was.

The Project Euler problems, as far as I can tell, are each based off of some principle in math, which when found can lead to fast results. 

Wednesday, March 7, 2012

Math Lab Scheduler: March 7

We have had a lot of time to go over the project and in just a few minutes we will be presenting the proposal to the people we are doing this for.  We are super excited about it and hope that it makes a difference in the lives of a lot of students here at BYU - Idaho.

We have decided to use Google Docs in order to collect and transport the schedules and the information of the tutors each semester.

We have also decided to use as our main framework the Drools Planner Library.  Out of all of the programs and code that I looked at, this seems the most readable and effective code for CSP programming.  More updates on the actual code and the other things we have been learning soon.

Tuesday, March 6, 2012

Soft-Bricked my photon

So I broke my phone the other night.  I enjoy tinkering with stuff, always have.  But sometimes I end up breaking the stuff I am tinkering with.  I didn't panic because I have done this often enough to know there is a way to fix it, typically.  What happened was my phone was at about 5% power (I think) when I went to update Jokerax's Cyanogenmod ICS Beta from 0.2.0 to 0.3.0.  (Love his work btw).  Well, it crashed in the middle of that and so it wouldn't turn on beyond the red Motorola M screen.  



After a lot of failed attempts to turn the thing on, or even charge it (it won't charge if it has been soft-bricked like this either), I went online in search of a solution; and lo and behold I found one!


The long and the short of it is to cut open a usb cable and splice in the bare cables into your battery to charge it for a few minutes (only enough to recover your phone as any longer could be dangerous, overcharging).  I will not give you details here as I don't want the responsibility but you can find instructions online.  Just don't burn down your house in the process of charging your phone battery like this, much better to just make sure your phone is fully charged before doing anything with it in CMW!  I've learned my lesson.  

Saturday, March 3, 2012

The Math Lab Scheduler Project: March 3rd

Today I got back into the game with the team I am working with on the math lab scheduler project.  It is coming along and the design document is almost done.  We are trying hard to keep everything within the scope of our allotted four weeks, and it is hard to do so; we are so excited about everything that it could do!  We ended up spending a good three hours there in the Linux Lab working on the details and hammering out what we are doing with the GUI and the data structure.

Definitely learning here that it is better to spend time planning before hand.

Thursday, March 1, 2012

Day 2 of the Seattle Expedition

Day 2 of the Seattle Expedition was much better for several reasons:

First, I didn't have to wake up at 4:30 in the morning to go catch a bus down to Utah: definitely an improvement.  

Second, we got to visit some much cooler companies:  Nordstrom, Fresh Consulting, and Microsoft to name the ones that most impressed me.  Each had their own culture and mentality that was hard to miss, and each were cordial and a pleasure to work with in turn.  I definitely felt like the best fit for me was either at Microsoft or Fresh Consulting; Microsoft having a very competitive and intelligent nature, while Fresh Consulting and terrific work ethic and an innovative and entrepreneurial spirit.  

Mike from Fresh Consulting was very transparent, and in everything he did he sought to instill in us the attributes and the lessons that helped him in his path to success.  He was very transparent, trusting of us, and humble.  He started his little talk by telling a 10-minute version of his life and the most important moments therein:  The passing of his first wife to cancer, and the joy and renewal he found in marrying and bearing more children.  I appreciated his speaking with us and being so clearly moved by pictures he showed us, without making us uncomfortable because it was a lesson in transparency:  be the first to trust and to put your feelings and emotions on the line.  He spoke mostly of the movement in social media and how important it is to become an active participant in that realm through producing and interacting with others.  He told many stories of doors opening to him because he reached out.  The principle he emphasized the most was to be exactly who you are online as you are in real life, because people want to connect with people.

He also mentioned a book:  Never Eat Alone, so Justin and I tried to do that tonight.  (Sushi, yum!)


He was a pleasure to listen to, and I felt like it was a good reminder to write in my blog.  :-)

Wednesday, February 15, 2012

Advice in your job search

Now, don't let me fool you into thinking that I am a professional; because I am not.  My only qualification for thinking that I have anything to share regarding the subject of job hunting is that I have always managed to find a job when I needed one.  So with that begin said let you give you a little background that will double as a disclaimer:  I am soon going to be graduating with a degree in a science field, I have a wife with a baby on the way.  I have lived in both urban cities and rural towns, and I am not the top of my class. I have interests in many areas, and consider myself handsome while not overly so.  Most of these things matter in a job search, if not to your employer they will to you.  Now...

1.  Be a charitable and giving person.  I am a member of the Church of Jesus Christ of Latter-day Saints, a Mormon.  A cute nickname coined for the scripture that we hold as canon:  The Book of Mormon, you can find more here.  We also believe in a little thing called tithing, which is a voluntary charitable donation to our church of one-tenth of my income.  I've always paid it and I always will because I know that I, nor my family will go hungry when I do.  It's not a matter of math though, it is a matter of faith.  As for those who belong to a faith of any kind, you may or may not agree with me but the scriptures are clear on this.  As for you that don't believe in this, then believe that by sharing what you have be it little or great, it will pay in dividends to do so.  Call it karma, the universe, or whatever:  By giving you will receive more in return.  I always intend to live this way and this is my first point of advice, is to be a charitable and giving person.

2.  Apply Everywhere.  Depending on your qualifications this may not be reasonable, but apply everywhere that you have even an inkling of qualifying.  Prioritize:  Apply to the places that interest you first, and then those places that sound like they could be something that you will enjoy, and then apply to those places that you are just qualified for (if you qualify, you at some point enjoyed doing what makes you so).  This is important as often it was the last place that I applied for that I got the job at.  Case in point:  When I got an internship at a local software company, it was in fact the last place that I qualified for that I was accepted at.

3.  Follow Up.  Call them, email them, thank them, sincerely.  Keep in contact with those people that you network with, check up on them, chat about whatever, talk about the jobs you applied for, let them know you are interested.  Another job I held for some time I was able to get because I called them every day or every other day asking them about how the interview and the hiring process was going.  Sometimes they may ask you not to call them, and generally it is a good idea to honor that:  irritating the HR people is akin to irritating the guards to the front door of the castle.  But by doing this (sincerely) you will indicate how interested you are in the job and your own confidence as a potential hire.

4.  Social Media.  Love it or hate it, it is here to stay.  Social media is an amazing medium to network and connect with people all over the world instantaneously.  It's amazingly powerful as both a tool and a means of destroying your future in any company.  Thankfully the world is still large, even if it is becoming more flat.  Get connected on every medium that you can reasonably keep up with:  Facebook, Twitter, LinkedIn, Deviant Art, Flickr, Tumblr, Foursquare, etc, etc.  Depending on your skill set and your audience, one may be more suited for you than another.  The key is to be involved in a positive way.  I am currently interviewing for a job after college because I kept my LinkedIn resume up-to-date and professional, the recruiters in fact found me.  The bottom line is that these are networking tools, a means of connecting you with people online and promoting relationships in real life.  They are not an end in themselves.  So if you suck at relationships in real life, chances are these tools will not help you in the same way that they help others with those skills.  Just something to keep in mind.

This post will be continued in a few days, just something to chew on for now.  

Tuesday, January 24, 2012

Applying for Jobs

Right now I have been applying to Grad School and to looking around for jobs as well.  I am of the belief that it's all about quantity when I go to apply for the next great step in life.  When I got my internship at AMX last year, it was the last of about 30-some odd applications that I made.  In my photography business, we talk to as many people as we can about our business and what is going on. I have applied to three grad schools and considering a fourth.  Etc.

This isn't to say one should settle for a job they hate, but that you should look for many jobs that you could enjoy or may even learn to enjoy.  Applying to a lot of places is time well spent, and they shouldn't cost you any money anyways.  This is a different story for grad schools, but I feel just as strongly about it, albeit I apply to fewer.

Here are a few websites that I find helpful!

LDS Jobs - This is the LDS Church's website for members looking for jobs.  My dad is a regional representative in Florida for Church employment services, and always recommends signing up here.

LinkedIn - If you don't already have an account here, get one.  Even if you have a job, this is a great place to maintain a network of professionals and participate in a community of like-minded individuals.

Facebook - Love it or hate it, you cannot deny the networking power of friends.  Here is an article arguing on favor of Social networking and gives some tips on effectively doing it.  The best advice I have received here is this:  When letting people know that you are looking for a job, don't approach it as you would laying out a blanket on the park lawn:  Wide and shallow.  Rather do it with a focus on a single company or a single job, the more focused the better.  This may seem a bit counter-intuitive, but if you have a large network of friends, chances are someone will know someone who has a job there.  Especially if you have kept in contact with college buddies or high school buddies from a few years ago:  The reason being they have probably moved away and within one or two friends you can arrive at any state and several countries.  Try it!

These are the websites that I am working with right now.  I hope this can benefit someone out there!