Posted on 2 Comments

Internet Access a Fundamental Right

In 1988, I was introduced to this thing called the Internet. At the time, I was told there were 25,000 nodes on the Internet. I have since tried to confirm that number and come up with a number more like 66,000. The Internet at the time was somewhat elitist. Today, the BBC published an article suggesting that 4 out of 5 people believe access to the Internet is a fundamental right. Even the UN agrees. This line of thinking places Internet access on par with roads, waste, and water.

It’s fascinating to have witnessed the growth of such a world changing technology. I’m embarrassed to admit that around 1992 when commercialization of the Internet was being discussed that I was among those saying commercialization would destroy the Internet. When the Internet moved from strictly the domains of the universities and military in 1994, I was proven wrong.

Posted on Leave a comment

Magento – Not currently favorite color

Why is debugging and troubleshooting in Magento so difficult? Because of error messages like this:

Notice: Undefined variable: rootNode in C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Eav\Model\Entity\Attribute\Source\Config.php on line 53
Trace:
#0 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Eav\Model\Entity\Attribute\Source\Config.php(53): mageCoreErrorHandler(8, ‘Undefined varia…’, ‘C:\Domains\exam…’, 53, Array)
#1 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Adminhtml\Block\Widget\Form.php(196): Mage_Eav_Model_Entity_Attribute_Source_Config->getAllOptions(true, true)
#2 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Adminhtml\Block\Customer\Edit\Tab\Account.php(54): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset))
#3 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Adminhtml\Block\Customer\Edit\Tabs.php(58): Mage_Adminhtml_Block_Customer_Edit_Tab_Account->initForm()
#4 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Abstract.php(642): Mage_Adminhtml_Block_Customer_Edit_Tabs->_beforeToHtml()
#5 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Text\List.php(43): Mage_Core_Block_Abstract->toHtml()
#6 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Abstract.php(643): Mage_Core_Block_Text_List->_toHtml()
#7 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#8 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml(‘left’, true)
#9 C:\Domains\example.com\wwwroot\magento\app\design\adminhtml\default\default\template\page.phtml(58): Mage_Core_Block_Abstract->getChildHtml(‘left’)
#10 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Template.php(144): include(‘C:\Domains\leoa…’)
#11 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Template.php(176): Mage_Core_Block_Template->fetchView(‘adminhtml\defau…’)
#12 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Template.php(193): Mage_Core_Block_Template->renderView()
#13 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Adminhtml\Block\Template.php(81): Mage_Core_Block_Template->_toHtml()
#14 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Abstract.php(643): Mage_Adminhtml_Block_Template->_toHtml()
#15 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Model\Layout.php(526): Mage_Core_Block_Abstract->toHtml()
#16 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(347): Mage_Core_Model_Layout->getOutput()
#17 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Adminhtml\controllers\CustomerController.php(117): Mage_Core_Controller_Varien_Action->renderLayout()
#18 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(376): Mage_Adminhtml_CustomerController->editAction()
#19 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch(‘edit’)
#20 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#21 C:\Domains\example.com\wwwroot\magento\app\Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch()
#22 C:\Domains\example.com\wwwroot\magento\index.php(65): Mage::run()
#23 {main}

Yes, it screams "undefined variable" which is rootNode but through Magento’s excellent use of object oriented spaghetti, the error does not in anyway reveal what is truly causing rootNode to be undefined nor where to even begin looking.

Posted on Leave a comment

Current Magento Questions – getCustomerFormData

The Magento ecommerce question I am trying to answer right now is what does getCustomerFormData() do?

In AccountController.php and Register.php there is this reference $data = $this->_getSession()->getCustomerFormData(true); and this reference $data = new Varien_Object(Mage::getSingleton(‘customer/session’)->getCustomerFormData(true)); respectively. I’ve searched using grep and within eclipse’s file search but can find no other reference to getCustomerFormData.

I can find no reference to getCustomerFormData other than these two lines of code. So what is this supposed to be accomplishing?

Posted on 1 Comment

Magento – Developer Killer

While trying to add some functionality to my client’s Magento ecommerce store, I came across an article that summed up my Magento experience quite well:

Most of us in ecommerce application development have already heard of Magento. Some would call it new ecommerce killer app. I myself stand with that statement for many of reasons. However I would like to call it with one more name, developer killer app. This developer killer is what I literally had in mind. Magento is currently one of the most difficult PHP systems out there a developer could learn and master. [Source, {}activecodeline, What makes Magento so hard to learn (emphasis added)]

I have put so much effort into learning this system that I both never want to touch it again AND must do more Magento development so that this exercise of gaining knowledge does not go to waste.

Today’s links for Magento success:

Posted on Leave a comment

Magento References

Relevant to my life right now:

Posted on 3 Comments

How long have I been on the Internet?

I’ve been on the Internet so long that I just went to a website that I had never heard of and tried to create an account only to discover I already had an account. So either my memory is worse than I thought or I’ve consumed so much of The Internet that I can now see the whole thing again and enjoy as if I was seeing it for the first time!

Posted on 2 Comments

Magento Actions

The Magento E-commerce system is an exciting open source alternative to systems like OS Commerce. The learning curve isn’t really a curve at all. The learning curve is more like a sheer, glassy. polished mountain face shooting straight up into the heavens. However, plenty of documentation exists, Google overfloweth with links to blog post, and IRC support is available on Freenode #magento (although I believe most questions go to /dev/null so expect to feel a little like you are talking to yourself but like your $200/hr psychologist will explain, sometimes that’s all we need).

As I work through understanding how Magento handles layouts, I struggle to find a simple list of actions and perhaps I’m trying to hard. So far the is this:

addJs
addCss
addLink
addItemRender
unsetChild
setHeaderTitle
setTemplate

Ah! I found a reference! See page 7 of Magento Layout Files Reference (see also same document, different format).

Update: The Magento wiki has this defined under Designing for Magento.

Posted on Leave a comment

A round tuit and a “new” laptop

A good friend passed me their old laptop with an operating system that was broken. Doing that thing I do, I installed a new operating system and am pleased that the laptop easily meets my needs as far as processor and memory are concerned. I debated dual booting the machine so that I could work in either Linux or Windows XP but decided to try my hand with a virtual machine (VirtualBox). In this case, Ubuntu Linux is going to be installed in a VM within Windows XP which should allow me to take my development environment with me anywhere I go.

Posted on 1 Comment

Maximum length of an email address is 254 characters, not 320

I work in a business of constant learning. Technology is continually evolving and being revised. Somethings are rather constant but, being human, weI tend to develop habits occasionally rooted in wrong assumptions. Perhaps a deadline forced a decision without having time to look up the specification and over time, our mind took that unresearched decision as fact. I’ve made numerous databases over the years based upon just such a wrong assumption. My error has been in the acceptable maximum length of an email address. My number is irrelevant but I am in good company with being incorrect on the length of an email address as many people mistakenly believe it to be 320 characters.

An RFC is a request for comments which "is a memorandum published by the Internet Engineering Task Force (IETF) describing methods, behaviors, research, or innovations applicable to the working of the Internet and Internet-connected systems." (Wikipedia) RFCs set the standards that define how the Internet works. RFC3696 and RFC5321 explain that the maximum length of an email address is 254 characters.

There appears to be some confusion over the maximum valid email address size. Most people believe it to be 320 characters (64 characters for the username + 255 characters for the domain + 1 character for the @ symbol). Other sources suggest 129 (64 + 1 + 64) or 384 (128+1+255, assuming the username doubles in length in the future).

This confusion means you should heed the ‘robustness principle’ ("developers should carefully write software that adheres closely to extant RFCs but accept and parse input from peers that might not be consistent with those RFCs." – Wikipedia) when writing software that deals with email addresses. Furthermore, some software may be crippled by naive assumptions, e.g. thinking that 50 characters is adequate (examples). Your 200 character email address may be technically valid but that will not help you if most websites or applications reject it.

The actual maximum email length is currently 254 characters:

"The original version of RFC 3696 did indeed say 320 was the maximum length, but John Klensin (ICANN) subsequently accepted this was wrong."

"This arises from the simple arithmetic of maximum length of a domain (255 characters) + maximum length of a mailbox (64 characters) + the @ symbol = 320 characters. Wrong. This canard is actually documented in the original version of RFC3696. It was corrected in the errata. There’s actually a restriction from RFC5321 on the path element of an SMTP transaction of 256 characters. But this includes angled brackets around the email address, so the maximum length of an email address is 254 characters." – Dominic Sayers

[Source, EPH, Email Address Length FAQ]

Every day I learn something new! (even when I should have known it for a couple of decades)

Posted on 3 Comments

We used to call it The Internet…now it’s just Google

We’ve been living in the Wild West of The Internet. The Internet used to mean Gopher, Veronica, Archie, Usenet, MUDs, IRC (Fall ’88), and telnet, none of which used a graphical interface. Everything was done from the command line, UNIX’s equivalent of the DOS prompt. Today my children, as most people, live on a tamer Internet and feel that The Internet is something you look at with Internet Explorer, Firefox or Safari. Chrome users know better. In the past, using a search engine did not mean using Google. Google. How about that Google? Google is doing so well that we have started to aggregate all our services into Google. I know I have. I use GMail, Google Voice, Google Wave, Google Docs, Google Calendar, Google Reader, and so on. All my data is slowly finding its way to a single company, one which I don’t control. That should scare the pants off of us!

In today’s world of collaboration and information sharing, url shorteners are all the rage. A URL shortener takes a long web address and shortens it to as few characters as possible for sending in SMS messages or making the address easier for someone to type. Bit.ly is the forerunner having secured the default url shortener position with Twitter and Seesmic. 3.ly is my favorite. Despite being essential tools, Dave Winer makes a good argument for why these URL shorteners are bad for the Internet and offers a fix to their inherent problem. The concept of a URL shortener is simple. You could make your own URL shortening service and WordPress users could make a URL shortener plugin. If you made your own, you’d be in control of your data; a principle I highly encourage despite housing so much of myself in The Cloud.

Today, Google enters the URL shortening scene with http://goo.gl/ Expect this to take off. Expect some struggling shortening services to close doors causing waves of link rot across the Internet. As Google consumes another popular activity, url shortening, do we take one more step to losing The Internet to The Google in the way that online activity prior to The Internet used to be known as CompuServe, Prodigy and AOL? In 5 years, will there still be An Internet or will we simply connect to The Google?

Google URL Shortener at goo.gl is a service that takes long URLs and squeezes them into fewer characters to make a link that is easier to share, tweet, or email to friends. The core goals of this service are:

  • Stability – ensuring that the service has very good uptime
  • Security – protecting users from malware and phishing pages
  • Speed – fast resolution of short URLs

Google URL Shortener is currently available for Google products and not for broader consumer use.

The Google privacy policy applies to the Google URL Shortener. Please note that Google may choose to publicly display aggregate and non-personally identifiable statistics about particular shortened links, such as the number of end user clicks.

Update: Interestingly enough, yesterday, Bit.ly announced Bit.ly Pro, a service to use Bit.ly’s software but with your own domain name. Take note, this is still giving your data to a 3rd party (The Cloud) but it is a proven service, with a system with very interesting feedback (statistics), and probably far more scalable than something you could build from scratch. Dave Winer revisits his concerns with Bit.ly in Build to Flip?.