I have spent most of the day trying to display my most played albums as recorded on last.fm. I still don’t have it working. I am tired and frustrated.
The problem is getting an array to display the way I want using Smarty. I can finally get all the elements of the array that I want to use to print in Smarty, but I am not sure now how to format them (e.g., href, image, surrounding text, etc.).
Google is an absolute wonder in helping me program. Searches return results that are relevant and often solve my problem. If I am not sure how to use a php function Google brings up the manual. Decent manual especially with the comments by users.
I got lots of leads, but ultimately can’t figure it out. I’ll post a question and see if I get an answer.
So why program?
First, I firmly believe that a person’s explanation of why they did something is terribly suspect. Why did you vote for Obama/McCain? Why did you marry/divorce that person? Why did you choose your job, house, car, hobby? The answer is likely to be some self-serving answer that makes the person look good. I decided to be a lawyer so I could help people. Yeah, right.
So here are a few possibilities why I spend lots of time programming:
- It makes me look super smart,
- It is intellectually challenging,
- It is a way to hide and procrastinate,
- It is so different from the practice of law that I find it rewarding (this is how I usually answer the question),
- It is cool when it works,
- It keeps me from facing issues (God, my 401(k) has tanked!),
- It is a destructive habit that I don’t know how to shake.
So, choose. You probably are as good–if not a better–judge of why I do something than I am.
Oh, if you know how to format a multi-element array in Smarty, please comment!