The VP Geek Speaks
- Home /
- The VP Geek Speaks
Mobile Web Development Is the New Internet Explorer 6
Developing a website that works well across devices and browsers is an excersize in playing Whack-A-Mole. Once you get one browser working on a desktop browser, you go to the next browser and find that not everything works the same way. In 2014, it seems that there aren’t that many differences in functionality between desktop browsers, but that all changes once you start making a responsive website that must handle mobile devices as well as it does desktop browsers.
Avoid SQL Deadlocks -- Break Up Large Updates
Deadlocks in SQL occur when one query locks certain rows, frequently for updates, and a second query tries to update those same rows. The second query will then create an error as those rows are unable to be updated since they are in the middle of an update from another query. One of the surefire ways to create a slow running update query like the first query above is to hava a single update statement that will update a large number of rows at once.
Micromanagement Ruins Teams
It seems that the management thinking these days is that managers should empower their employees to make decisions and implement the actions behind these decisions. This works great when you have a team and management that has mutual trust with a mutual goal. However, when the manager does not trust the members of the team, or thinks that they have to be the one to make every decision or have input into every task, the empowerment disappears.
Unintended Consequences with Magento Observers on Sales Orders
Anyone that uses Magento to place orders will be hard-pressed to consider this process a speedy one. While it takes a while to process the order under the best of circumstances, there are a few things that you can do that actually make it worse.
One of those things that can make it worse is creating an observer that runs in the middle of the saving of the order processes that is always slow-running, or continues to get slower over time as the data that the Magento site grows. While the observer may run well at first, over time as the data grows, some random symptoms may show up, including database deadlocks and even some missing sales orders.
Magento Version 2, is it just Microsoft Windows Longhorn AKA Vista?
Magento version 2 was first introduced in 2010. It is now almost halfway through 2014, and the public has not seen any alpha or beta release of Magento version 2 as of yet. The new version of Magento promised to replace PrototypeJS and Scriptaculus with jQuery as well as reorganize the database schema to remove the slow EAV tables and migrate to a bit of a flatter table structure. However, it seems that the latest updates on the direction for Magento 2 show that the database schema will not be changed much after all.
Why Use AddThis.com Sharing Buttons
AddThis.com produces a bit of JavaScript that enables website owners to quickly and easily add social sharing buttons/links to their website. In addition to allowing users to easily share your content socially, they also provide analytics information about what content is shared via which method, giving a greater insight into visitor behavior.
However, just because it provides these benefits to websites does not necessarily mean that it is a good tool to implement on your website. If you are concerned about the performance and the total payload size for your website, then you may have some reservations about the AddThis sharing buttons. On one site I was looking at, when all of the AddThis JavaScript, CSS and Images were combined, it took up 250kB. When you consider that this is a responsive website, and many mobile users only get 300MB of data before they get to overage fees, you hope that there are other ways to implement the sharing to the major social sites.
Always Namespace Variable Names in JavaScript
After running into a few issues with variable naming collisions over the past few days, it drives home how much we all should be namespacing our variable names in JavaScript. When writing JavaScript code that is only in use on your own website, you should still always namespace your variables. If you are writting a JavaScript library that will be in use on any website a user puts it on, namespacing your variable names is a minimum requirement.
Avoid jQuery.bind()
When chasing down performance issues, you never know what kind of problems you will find. I was looking for something that would cause jitter when scrolling on the page. After looking at the custom code that runs on every scroll event, I still had not found a reason for the jitter. Looking at the JavaScript CPU profile when scrolling in Chrome showed that there was an overwhelming majority of the time spent in a function in the Prototype JS library.
Improve jQuery Performance With $().addClass()
When looking at things that make a website seem sluggish, you might assume that the most popular JavaScript framework out there always does things in the most efficient manner. However, as I have found, jQuery does not always produce the best performance due to it having to support many different browsers with version 1.x. As a general rule, instead of setting CSS attributes directly on the selected nodes, I prefer to instead add and remove classes on those nodes instead, as it seems to perform much better.
Optimizing Website Load Time
Assuming you have already done a few things to improve the page load time of your website, such as using a Varnish caching server, GZipping your content in transit, minifying that same content, and turning on all caching options that Magento or your web platform of choice have available, there is still more you can do. When it comes to website performance, the 80/20 rule definitely applies. 80% of the performance tweaks that you perform will only provide a miniscule improvement to the site load time, while the 20% of things you do make a big difference. Any time I am looking to speed of the performance of a website, I seek those 20% items that give you the biggest bang for your buck.
Categories
Tags
- 100pounds
- 2020
- Acp
- Adblock-Plus
- Adoption
- Agentic
- Agents
- Agile
- Ai
- Ai-Agents
- Amazon
- Apache
- Apple
- Architecture
- Authorize-Net
- Automation
- Azure
- Bing
- Bingbot
- Blog
- Book-Reviews
- Books
- Burnout
- Business-Tools
- Cache
- Career
- Chatgpt
- Chrome
- Cicd
- Claude
- Cloudflare
- Code-Quality
- Code-Review
- Codex
- Coding
- Coding-Agents
- Compass
- Conversion
- Copilot
- Css
- Culture
- Cursor
- Cve
- Design-Patterns
- Developer-Experience
- Developer-Tools
- Developer-Velocity
- Development
- Disqus
- Docker
- Documentation
- Enterprise
- Fine-Tuning
- Firefox
- Future-of-Work
- Gemini
- Genesis-Framework
- Getting-Started
- Ghost-Tag
- Github
- Github-Copilot
- Githubpages
- Google-Slides
- Google-Workspace
- Governance
- Helper
- Hiring
- How-Not-To
- How-To
- Html
- Hugo
- Infrastructure
- Integration
- Internet-Explorer
- Interviews
- Iphone-6
- Javascript
- Jekyll
- Jetbrains
- Jquery
- Junior-Developers
- Knowledge-Management
- Laravel
- Leadership
- Legal
- Lessons-Learned
- Local-First
- MacOS
- Magento
- Magento 2
- Magento2
- Management
- Mcp
- Meetings
- Mental-Health
- Mentorship
- Metr
- Metrics
- Microsoft
- Moltbot
- Multi-Agent
- Mysql
- Netlify
- Nginx
- Nodejs
- Open-Source
- Openai
- Openclaw
- Orchestration
- OSX
- Performance
- Personal
- Php
- Policy
- Presentations
- Process
- Productivity
- Programming
- Prompt-Injection
- Pull-Requests
- Python
- Quality
- Rant
- Remote-Work
- Research
- Responsive-Web-Design
- Retrospective
- Roi
- Safari
- Sales
- Scrum
- Security
- Senior-Engineers
- Series
- Sitecatalyst
- Sota
- Sql
- Sql-Server
- Tasks
- Teams
- Technical-Debt
- Testing
- Tier-Pricing
- Tips
- Tmobile
- Tools
- Trust
- Unittest
- Ux
- Varnish
- Verification
- Vibe-Coding
- Visual-Studio
- Web-Development
- Windows-7
- Windows-Vista
- Woocommerce
- Wordpress
- Workflow
- Workflows
- Xml