Newsflash

Check out my URL Shortener eatsh.it

Check out my new URL shortener eatsh.it.  The functionality in place right now is pretty basic, you can make a short url on the web site.  There is also an API available.  I will be posting a tutorial on how to leverage it later.

 
Finally integrated my URL Shortener

A month ago I created my own URL shortener eatsh.it.

Today I am integrating it into my blog.  Now all the articles I post, will be posted on twitter with my URL Shortener service.

To use it, simply go to http://eatsh.it.

Or, you can integrate it into a web app by calling http://eatsh.it/create?url={ENCODED URL}  It will return your new short URL.

 

Nate

 
Welcome
Welcome to my blog.  I will be posting PHP, iPhone SDK, and Social Media articles on a regular basis.  For ideas/feedback send me a message on Twitter. @natelyman
 
About Nate Lyman

Nate Lyman is an avid technologist/apple fan boy/php evangelist originally from Chicago IL.  After spending his college years in Des Moines IA, he is now residing in Silicon Valley CA.

Nate is currently employed at eBay as a Senior Software Engineer for the Advertising Technology Solutions group.  In the past he has been an IT Manager for a medium sized business, as well as lead developer/technologist for a Music Start Up.

At work, Nate works on the industry leading Internet Marketing platform.  A analytical tuned system that manages Paid Search, Natural Search, Online Comparison Shopping, and Competitive Intelligence.

Nate's hobbies include spending time with his fiance Kate and their dog Maddie, Web 2.0, NFL, Social Media, and developing PHP Web Apps/iPhone Apps.

 
Home
Oh, how I love array_combine PDF Print E-mail
Programming
Written by Nate Lyman   
Monday, 08 February 2010 08:15

Let me just start by saying that it is late, but I am up late working on parsing a huge text file. 120,000,000 rows huge.  Anyway, let me enlighten you on the awesomeness of array_combine().

Imagine you have some tab delimited file that looks like this:

Show/Hidden php code

Imagine you want to parse this file row by row and load the data of each row into an associative array.  There is an overly complicated way you can do it, as seen below:

Show/Hidden php code

Enter array_combine(). You simply pass it in an array of keys, and the array of values, it returns an associative array. See the same function below using array_combine().

Show/Hidden php code

Obviously this doesn't save you a lot of lines of codes, but it saves you a minute or two.  The point is that you should use PHP's native function instead of writing your own, for readability, as well as performance.  For small arrays you wont see a performance gain, but for a larger array it will run about 30% faster.  Multiply the savings by the number of rows and it can end up being substantial.  This post is to aimed to help a developer that is new to PHP.  There are a lot of other uses for array_combine but I'll let you figure those out.

 
New iPhone template for my site PDF Print E-mail
Programming
Written by Nate Lyman   
Monday, 08 February 2010 08:05

I've installed a new theme targeted for users of iPhones.  It will display content in a mobile friendly format.

As you know this site is a Joomla installation, and to get this to work I installed a module called Auto Template Switcher. It lets you target certain browser types (user agents) and send those requests to a special test.  For everyone but iPhone users they will see my normal template.  But iPhone users will see a modified version of NewsPressed Mobile.  To be honest the theme itself is kind of craptastic.  I'll get around to writing one to Apple spec one of these days, but there are bigger fish to fry first.

Finally, the reason this site is using Joomla is because I wanted a turn key solution.  I've got my own CMS framework that I use for other sites, but I didnt want to do a whole lot of customization for this site.

I still have some more awesomization to do here, and as I add them, I will let you know.

 
HipHop for PHP announced PDF Print E-mail
Programming
Written by Nate Lyman   
Wednesday, 03 February 2010 17:15

HipHop for PHPYesterday, Facebook announced a substantial contribution to the PHP community, HipHop for PHP.  This isn't the first time Facebook has contributed to the Open Source community.  In the past they have contributed enhancements to APC, memcached, and also PHP itself.  HipHop for PHP is a revolutionary release for the PHP Community.  It gives PHP the scalability and performance of a compiled language (C/C++/Java) but keeps most of the flexibility of a scripting language.

Facebook has implemented HipHop for PHP on it's own site and has seen a reduction in CPU cycles in upwards of 50%.  For a site that serves 400 billion page view a month that is substantial.  While 50% efficiency gains on your server are amazing, HipHop for PHP is really directed at large scale PHP implementations.  For your average business website or blog it would be total overkill.  But complex web applications it is a game changer to say the least.

Last Updated on Wednesday, 03 February 2010 17:18
 
What kind of Facebook user are you? PDF Print E-mail
Technology
Written by Nate Lyman   
Tuesday, 02 February 2010 22:34

A guy at work had this link in his status.  It is spot on.

Check it out on The Oatmeal

 


I have a lot of friends classified as Gamers, Quiz Takers and one "The Rash"

 
How to kill your Career PDF Print E-mail
Technology
Written by Nate Lyman   
Friday, 29 January 2010 16:34

Let's be honest. There are about 1001 different ways you can screw up your career and relegate yourself to just being average.  If you look at successful people they have a lot of things in common.  In my opinion the most crucial trait you must have to be successful is how you deal with problems.

Leaders don't complain, leaders identify the problem and seek a solution.  Complaining about things will do 3 things that are extremely damaging to you.  First, complaining wastes time, your time is valuable, and if you can't see that you'll never go anywhere.  Secondly, complaining about a problem only distracts you from solving the problem, often times making things worse.  Lastly, complaining could potentially label you as the whiner in your team, which discredits any amount of knowledge you may have in an area.

This whole post comes from sitting in a meeting the other day and having someone complain and complain about something.  I'm not going to share exactly what he/she was complaining about, but it had to do with adopting a new product.  This person hates the new product for whatever valid/invalid reason and whined about it, over and over.  What will the outcome be? Probably pigeon holing yourself into projects that don't use the new product and stagnating in old projects.

Instead, this person's approach could have been offering help to the team in implementing it in a way that minimizes the products downsides.  If you have experience in something, whether you like it or not, offer your help.  You've already learned how not use it, pass on that information and become the person who saved your team a bunch of time.

At the end of the day, both approaches will cost you the same amount of time. The latter however, will take you places.

 
« StartPrev12345NextEnd »

Page 1 of 5

@natelyman

natelyman: Oh, how I love array_combine #php http://eatsh.it/1S
natelyman: New iPhone template for my site #php http://eatsh.it/1R
natelyman: I'm working late. Have a 120m row file to get into a database. Let the waiting commence. #PHP #MSSQL
natelyman: #MusicMonday @thenadas New CD coming soon. Dig it.
natelyman: Attention #Startups I will write a blog post talking about how great your company is, in exchange for a MacBook Pro. Love, Tech Crunch
natelyman: #HipHop for #PHP announced http://eatsh.it/1P this is HUGE for the PHP Community