February 7, 2010

The Worst of MSN.com – Wasting My Time

Filed under: Bullshit / personal stuff, Interweb — sankho @ 9:54 pm

I use a few different browsers during my working day. To do my simple browsing, email checking, etc etc, I use Google’s chrome – because it’s fast. To do any web development; I use Firefox – because of the plugins. I can’t work without Firebug, the w3c Validator, and the Web Developer tool bar.

But near the end of a project, there comes that time to check the… other… browsers. Internet Explorers 6-8. I don’t use IE for even accidental surfing – strictly for cross browser checking. So I haven’t changed it’s settings or anything, and I’m forced to view it’s default home page.

Yeap. MSN.com.

Somehow, whenever I’m in the middle of debugging a site under IE6, I always manage to learn some new facts courtesy of Microsoft’s top notch web editors.

Bill Gates(‘ company) drops some knowledge on you:

  1. The average annual salary of an janitor… in 1958. ($3,455)
  2. The ever pressing issue of “Who looked hot” at the People’s Choice Awards
  3. Fruit bats get kinky, just like us
  4. Miley Cyrus! Not Hannah Montana Anymore!??
  5. Old people get married at Whole Foods. Good old fashioned, hard hitting online journalism.
  6. Does this city make my butt look big?
  7. Puppy CPR

More to come!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

December 30, 2009

Magento – Adjust the HTML Body Class of your pages via Layout XML

Filed under: Interweb, Magento, Tutorials — Tags: , , , , — sankho @ 2:49 am

magento_logoWhen it comes to Magento, I’m mostly a frontend developer. I’ve written some modules – some of which I’m working on sharing with you, public –  but for the most part I stick with it’s core functionalities and just edit the template HTML & CSS files.

As such, I found myself wondering how I could add a new class name to the body tag in the HTML. I at first checked the skeleton template files in the page/ directory of the template; and it just referenced a function. After a little hunting, I found out the correct way to add a new class in Magento – via the layout files.

If you don’t get the layout file concept of Magento, you really ought to look into it. I’m not here to enlighten you about that.

Anyway – you can add new body classes on a per module basis. So let’s say we want to give all the “my account” pages a body class of… account-control. This can be very useful to add a generic style across the board to each account page that is separate from the styling of the rest of the site.

You’d need to find the appropriate module block (I believe it is customer_account) and paste the following code in

  1.  
  2. <reference name="root">
  3.   <action method="addBodyClass"><classname>account-control</classname></action>
  4. </reference>
  5.  

That’s it! Make sure you refresh your cache if necessary, and refresh the account pages after logging into a user account. Check the source – an additional body class of “account-control” has been added!

I wasn’t as specific as I could have been about things in this article; let me know if you have any troubles and I’ll update as necessary for all you n00bs.

Cheers

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

December 11, 2009

Custom Magento Pages using your Text Editor, not the Admin CMS

Filed under: Interweb, Magento, Tutorials — sankho @ 1:29 pm

magento_ecommerceFor me, one of the most annoying things about Magento is the fact that the home page needs to be written in the Admin’s CMS. For that matter, any “custom” page you wanna build in Magento has to be done through the CMS.

I heart my text editors, and I hate writing HTML code into a CMS. It’s just not friendly. Tab indenting is impossible; if you hit tab your browser thinks you wanna select the next button! Think a textarea is gonna give you code hinting? Forget it!

Futhermore; I’m not a big fan of hosting files whose code I must edit regularly within the database. It’s just not practical.

Brad Frost recently blogged about the power of using Magento’s CMS blocks. I’m gonna take it one step further – let’s use the short code Brad Frost shows us in his blog to create custom pages that we can control through PHTML files in our theme; not code that is stored in the database. All you have to do is follow these steps:

  1. In the backend, create a new CMS page. Make sure to choose the appropriate layout (in the sidebar, click “custom design”) and enter in the page’s title, as well as it’s URL reference.
  2. Instead of writing your code in the textarea, stick this guy in there:
    {{block type=”core/template” name=”yourPageTitle” template=”cms/custom/your-file.phtml”}}
  3. In the above line, replace “yourPageTitle” with your page’s title – this isn’t terribly necessary, but good practice.
  4. More importantly, replace “cms/custom/your-file.phtml” with the directory that your PHTML file will be stored within the template folder of the theme you’re using. I store all my files in the “cms” folder under the template folder, and I created a folder called “custom” to store all my custom PHTML files. You can do the same or choose your own path; whatevs.

And that’s it! Save the page within the CMS, write some code into the PHTML file, and you should now be able to visit the URL you specified and see the code you wrote OUTSIDE of the CMS!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

November 17, 2009

One Big Mistake that Could Ruin your Projects

us-0125-40582-frontJust read the latest article at Fuel your Interface entitled “Three Big Mistakes that Can Make or Break your Design Career.” Super informative; one of the three tips were to never sit around waiting for work to come – go find it! In this day of social media, personal branding, and transparency, there’s no reason to wait for anything. Go out and get it!

The third tip was to not stretch yourself thin. I’ve personally committed this foul many a time. And everytime, it results in me stressing out, having a lesser quality of life (dramatic, but serious), and most importantly, my work suffers in one of two ways: It’s either terribly late or not as good as it can be. And both of those are unacceptable flaws; so don’t ever take more work than you personally can handle! Try to find someone who you can outsource work to; they may come back to you with work just when you need and don’t expect it.

But the second tip really interested me. Jokingly, it’s referred to as the “Garmon principle” – Garmon being some friend of the author (sorry to belittle your existence, dude named Garmon). From the article:

The first thing you should do is close your laptop, put away your cool bag of tricks, and think. Think, “What would be the perfect site for this? What would it look like? If there were no boundaries, what is the coolest thing, or the most functional way, to make this happen?” Also think, “What will make this worth existing as much or more than the next guy’s interface?” Once you have decided what the best possible solution would be, figure out how to do it. If there is something in your original idea that just simply isn’t possible, then amend it. “Re-idea,” if you will. But never, ever, EVER sit down and start doing things simply because you know how to do them. Because the truth is, no one really cares how much you know about coding or development. The people who are looking at this site aren’t thinking about what it took to make it, or how many advanced lines of code you wrote. They’re thinking about how it is now, as a whole.

So much sense! My feedback after the jump.

(more…)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

November 12, 2009

Lazy Web Development

Filed under: Bullshit / personal stuff, Interweb — Tags: , , — sankho @ 1:17 pm

lazy-cat5I spend most of my working hours on the front-end side of web development, so I tend to be pretty anal about… everything. Work related, that is.

So my buddy Neil Sarkar recently wrote about being lazier when it comes to programming. Though there’s some wavering of topic, the main idea is that as programmers, it’s not so important to know everything all the time – it’s more important to know what you need, when you need it.

This is all based on the premise that everything you don’t know – or used to know – is only a Google search away.

While reading, I found myself agreeing and disagreeing all at the same time. Or maybe separate times. Anyways, more past the break!

(more…)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

November 11, 2009

Magento: Approaching, and then Taming, the Beast.

Filed under: Bullshit / personal stuff, Interweb — Tags: , — sankho @ 12:27 pm

1847195946

Skip reading me, and read Brad Frost’s review of the book to your left.

Magento is a beast. While it continues to pickup accolades for it’s robust e commerce feature set, developers round the world can’t help but find it difficult to work with.

As someone who’s been working with the system for some 6 or so months now, I’m nowhere near an expert. But one thing I know, is that unlike other CMS’, you can’t just jump right into it… not easily at least.

With wordpress, I started learning how to make custom themes + plugins before I really embraced blogging with it myelf; and for the most part this was fine. By the time I started blogging myself, I already knew the ins + outs of the whole system via development.

This just isn’t true with Magento. Even after I had figured out the difficult things like how to customize a theme, or how to make a extensible module, I was still learning about how the system did what it’s supposed to: manage products.

Packt publishing recently put out a new book on Magento, giving it the title of “Beginner’s guide.” If you’re just getting into Magento, or considering making the jump, this might be agreat read for you.

But don’t take my words for it. Read Part 1 of Brad Frost’s review here.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

Words can be pretty too with Wordle

Filed under: Bullshit / personal stuff, Interweb — Tags: , — sankho @ 12:12 pm

Picture 1Whenever I see pictures like the one to the left, I wonder how long it took the designer to do.

But that’s because I’m stupid, and often forget that I’m something of a computer programmer.

Check out this site Wordle. It’s f*ckin awesome. Just enter in your own text, or choose a url to read text from – the image I made off of their site is in fact generated from text off of my blog.

It takes seconds, and there are a bunch of font / color / styling options. And all of them = awesome.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

November 7, 2009

Absolutely Ridiculous – Ajax is patented, get ready for a lawsuit?

Filed under: Bullshit / personal stuff, Interweb — Tags: , , — sankho @ 1:46 pm
Oh yes - There will be lawsuits.

Oh yes - There will be lawsuits.

This has to be one of the more absurd (internet related) schemes for profit that I’ve heard. But it does bring me one step closer to a real life version of that scene in hackers when the feds bust into my apartment to arrest me. Or maybe a different, more lawerly, subpoena-eee version of that story. Keep reading.

(more…)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

November 3, 2009

Make CSS Opacity play nice in IE7 and IE8 and even IE6

Filed under: Bullshit / personal stuff, Interweb — sankho @ 10:26 am

UPDATE c/o of Brad Frost – Doing this will invalidate your CSS! However, this is appropriate because 1.) We know exactly what is keeping our CSS from validating and 2.) We did it anyways to get something we want to work in another browser.

This is one of the few situations where it’s ok to ignore the ! in your web developer bar.

——————————————————————————-

So I made a slight joke about progressive enhancement in a previous post, but let’s be real for a second: If you could easily get all your site features working the same way in every browser, you would.

Well, as far as IE6 – 8 go, you can get opacity to work. Normally we’d code opacity into our stylesheet like so:

  1. .selector { opacity: 0.6; }

It’s super easy to get this CSS rule to comply in IE6+ – but it does involve the inclusion of another CSS invalidating Microsoft filter effect. However, it’s really short and easy to remember, so there’s no excuse for not having opacity affects / rollovers in IE!

  1. .selector { opacity: 0.6; filter: alpha(opacity=60); }

And that’s it! Whatever you wanted to be transparent will also work in IE6+! Obviuosly, instead of “0.6″ you’d type in “60″ for the filter rule.

There are actually a bevy of cool features available via Microsoft’s filter rule… too bad it only applies to their browsers, selfish bastards. Here’s a great post containing a lot of CSS2+ matching rules to Microsoft’s filters.

So, until Microsoft buckles under the ease of Webkit, at least get your opacities to be cross browser compliant, people!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

July 28, 2009

Wordpress 2.8 Media Upload Issue

Filed under: Interweb, Tutorials, wordpress — sankho @ 11:16 am

Gotta love that Wordpress. It seems like instead of doing a real, thorough QA, they rely on us to bitch and wine when shit doesn’t work until a.) one of us figures it out, or b.) we complain enough until they figure it out.

Then again, at least it’s a pure open source solution, unlike those greedy bastards at Varien who decided Magento was worth more than the price of a growing community.

But again, I digress.

So, are you among the dozens in this post that can’t upload their images after installing the new Wordpress v 2.8?

Me to. At least I was until I figured out a small solution. I commented on the above post with the information below.

In the wordpress admin, go to “settings,” then “miscellaneous.”

The first input field should be for the directory to which you store your images… for me it was the absolute path to my wp-content/uploads directory so it looked sort of like this

/a/lot/of/directories/until/blog/wp-content/uploads

And that was the error… simply replace whatever is in those fields to

wp-content/uploads

Notice there is no backslash at the beggining! As long as you’re storing your files in the same directory as any normal wordpress user, this ought to work. Basically the trick is to not use the absolute path to the folder and just use whatever folder is under the main wordpress directory.

Make sense?

If this hack manages to work for you, let others know! Or, if it didn’t, let me know so I don’t feel so good about myself (this can be accomplished with numerous other approaches as well).

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

May 7, 2009

Mac Envy and the Rocketdock

I’ll admit it; I’ve used PC’s all my life. I’ve been a slave to Microsoft ever since I can remember typing “win” into a dos command line to fire up a brand new installation of Windows 3.11.

Of course its a Macbook! Cant you see the apple?

Of course it's a Macbook! Can't you see the apple?

But times have changed, and I’ve grown more and more jaded with my relationship with Microsoft. Lately, things have taken a turn for the worse. The relationship has gotten pretty abusive ever since Vista got involved. We’re seeking counseling by way of a hard drive format and bootleg copy of XP.

And though I’m faithful, I can’t help but be jealous of my friend’s Macs. The slick interface, the lack of bugs, the UNIX based filesystem – it all looks so SEXY from this side of the error-prone, “ten-yarder” type of beauty on Vista’s yard. After getting an iPhone, I was resolved to save my money and get a Macbook down the road.

(more…)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

May 5, 2009

U.S. States for your Database

Filed under: Interweb — Tags: , , , , , — sankho @ 9:53 pm

After developing database driven websites for awhile, a few common issues come up.

USA! USA!

USA! USA!

One of them is getting all the states of the US & their abbreviations into the database, most likely for some sort of user registration. This was exactly the problem I faced a little while ago.

And like anyone who learned the majority of their internet skills on the internet itself, the first thing I did was a google search, and found this blog post at firewall pro.

It contains a CSV and SQL tables to easily input into your database all the U.S. states and their abbreviations, so you don’t have to.

Thanks goes to Scott for publishing the work so we can get back to actual programming!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

January 3, 2009

A Simple HTML Tip – Link to Images Without Annoying Borders

Filed under: Interweb, Tutorials, iPhone — Tags: , , , , , — Sankho @ 11:12 am

I was working on a site recently and a client wanted an image linked to a feedback form. But everytime I linked an image, it gave a nasty blue border around it! Check below the break for the simple tip!

(more…)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter

December 14, 2008

Social Networking – or – An Excuse to Say “I Told You So”

Filed under: Interweb — Tags: , , , , , — Sankho @ 9:48 pm

About two years ago, when the concept of “Social Networking” was all the rage, I had quit Facebook, in the middle of my college career of all times. I had done this, to a degree, because I had wanted to feel like a maverick, which is somewhat humbling to admit. What’s even more humbling to admit is the primary reason I had left Facebook, which was that I’m not that social of a dude. Sorry, world!

About a year and a half ago, I began my current lifestyle of “web developer,” working for business people in startups that loved to throw the words “Social Network” in whatever business plan/pitch they were using to spread their idea. I would warn anyone who would listen that they were throwing around buzz words of an idea destined to fail.

Why was I so unconvinced of “Social Networking?” Because it wasn’t making any real (see: advertising dollars) money for their companies, be it Facebook or MySpace. Not enough money to ever match the investments made to either of them. Lo and Behold, a few months later the world recognized what I had forseen.

My friends would then ask me what I think companies like Facebook and MySpace needed to do in order to (surv/thr)ive. I had responded that they wouldn’t; that eventually all of these social networks would be too much for the average user to take, and they’d simply get sick of logging into different website and remembering different credentials etc etc.

What the next step was, I told my friends, was for someone to make identity ubiqutous throughout a user’s internet experience. That is; grant the user the ability to float from one .com to another without losing their identities, and without requiring them to log-on to different sites constantly.

This was about a year and a half ago, and over this year, Facebook has released it’s Connect platform, Google has Friend Connect, MySpace has MySpaceId, all looking to do what I thought they were gonna do in the first place.

So if you’ve gotten this far in my very young blog, you’ve discovered one reason for it’s creation:

The next time some shit pops off on the internet, I’ll have HARD EVIDENCE that I had already forseen it’s happening.

Yes, I’m a very petty person.

The next post will be on the future of Identiy and the Internet.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter