Mar
7
2020
posted in JavaScript, TypeScript, Type Theory, UI Engineering
TypeScript
makes JavaScript safer and even opens up new
architectural possibilities such as
better unit tests.
I highly recommend it.
However, the default configuration encourages unsafe patterns
that developers might not be aware of.
Specifically, I wanted to illustrate the dangers of
any
and show how you can define custom
generics
instead.
I'll also offer some lint rules that will help your team
write safer TypeScript.
read article
Aug
6
2019
posted in High Performance, JavaScript, React, UI Engineering
At Mozilla, the Add-ons team hosts a casual
show & tell
each month. It's a public meeting and we invite community members to share their work.
This time I demo'd some of the work I've been doing to profile and optimize our
code manager,
a tool that the review team
uses to make sure add-ons are
safe
for Firefox users.
It's a code viewer that looks like an IDE: a file list on the left, code in the middle,
and a file overview on the right.
The UX is similar to reviewing a pull request on GitHub but the main difference is we integrate our automated scanning tools to provide hints about potential problems.
Watch the demo.
The big challenge we ran into is how to display very large code files and diffs without lag...
read article
Sep
19
2011
posted in Django, JavaScript, Mozilla, Python, The Future
Most people at Mozilla are remote so each quarter we sync up face to face as a group for an all-hands meeting. There are over 600 employees! We of course sync up in smaller groups more frequently but this is a chance to see what's going on across the entire Mozilla horizon.
So what's happening at Mozilla? We're on the cusp of a huge shift towards an open web platform. That is, something more than a web browser -- something you can run "native" apps on. There's a lot of work left to do, of course. Here is a random dump of interesting projects in the works...
read article
Mar
22
2011
posted in JavaScript, Mozilla
Firefox 4 has launched! If you want to watch the whole planet
upgrade in realtime head over to
glow.mozilla.org (built by @potch, @jeffbalogh, and others!).
If you haven't already downloaded Firefox 4 then what are you waiting for?
After that, join the twitter party by using the #fx4 hashtag in
your tweet...
read article
Mar
3
2011
posted in JavaScript, Mozilla, The Future
The Internet was invented so that data could be decentralized and liberated.
Well, so much for that idea.
With the rise of services such as Facebook and Twitter we are back to the
original mainframe problem: everything is stored and controlled by a central
authority. Ironically, today's "to the cloud" meme is making us depend
on central authorities even more.
So what about data privacy? In this centralized
model we go about our online lives constantly posting data to all these different
servers that we trust...
read article
Mar
3
2011
posted in JavaScript, Mozilla, The Future
Firefox 4 is near the end of its beta cycle but what is so special about this
release? Why not see for yourself on the new demo site, the Web of Wonder
(requires Firefox 4 beta but some demos do work in Chrome and Safari).
I'll be honest, as a web developer, the new power of HTML5, CSS3, SVG, WebGL, etc
totally blows my mind...
read article
Nov
30
2010
posted in Django, JavaScript, Mozilla, Python, The Future
Whenever I'd hear about someone from the Python community getting hired by Mozilla I'd get really excited because I knew they'd continue to share and collaborate in the open source world that I was a part of. So here I am about a month into joining Mozilla myself to work with the WebDev team. Everything Mozilla does is right out in the open: ideas are posted on blogs, code is committed to public repositories--free to use, free to fork, etc. They take a firm stance that everything you do on the web should be free and open even to the point where the new Firefox 4 audio API (which is amazing) doesn't even support the patented, closed MP3 format despite its ubiquity.
This transparent approach to technology is really powerful...
read article
Jun
8
2009
posted in Java, JavaScript, Testing
I've been experimenting with a new tool that was released open source recently called JsTestDriver
It's a tool that makes unit testing JavaScript simultaneously on many browsers from the command line very easy for the developer. Actually, there aren't many other tools like it that I know of. It also provides hooks for continuous integration (e.g. Xunit output) and is designed to help you run all unit tests when you click the save button in your code editor.
Here are some features it provides that I thought were nice ...
read article
May
5
2009
posted in JavaScript, Python
For a Pylons site I have been working on I wanted to provide Ajax functionality for the users but also allow the content to be crawled by search engines. Let me point out that not all of the Ajax content needs to degrade to static HTML, only the content that a user might search for on a search engine. Some people might decide that none of their site needs to be crawled by search engines, say, if it was Gmail or something similar.
Since the site is using Pylons it also uses Mako for templating and on the JavaScript side it uses the Dojo toolkit. The easiest way to render content dynamically (via altering the DOM in JavaScript) and render static HTML seemed to be by sharing my templates between Pylons and Dojo. While probably not the most elegant solution, here's how I did it ...
read article
Mar
10
2009
posted in JavaScript, Projects, Python, Testing
I just released 0.9.1 of the Fudge module which is a tool for working with fake objects while testing Python code. Some call these mocks, stubs, or actors, but I just call them all fakes because that way you don't have to change the names in code if you update your tests. You can get Fudge from PyPI or by running easy_install -U fudge
. This release contains some nice new features and several contributions by Cristian Esquivias. It has more documentation and some bug fixes but note that some functions have been deprecated.
See the changelog for all new features and details on the deprecations. Big thanks to Cristian for his contributions. Also, thanks goes to Marius Gedminas whose comments on my original Fudge announcement led to better names for some commonly used functions.
There is also an experimental, partially-implemented JavaScript port if you feel adventurous.
read article
Feb
12
2009
posted in JavaScript, Python, The Future
I came across this article today on Coding Horror about how Google has a monopoly on search engines and how something must be done about it. I'm not one who falls into the "Google Is Evil" camp; I actually think they are a benevolent force in the world :) However, as with any monopoly, the lack of competition stifles progress. And when I think about the state of today's technology, I can't help but wonder why Google has not fixed the most fatal flaw in their Googlebot :
It does not behave like a web browser.
Search engines are made for people and the majority of people browse the Internet with a web browser. The first comment on the article is a cry for help: "What can we do?" I have an answer to that question. And you can take my answer and turn it into a business plan and climb the golden staircase to success. Any smart investor would be begging you to take their money. Google generated $5.37 billion dollars in Q2 of 2008 and their flagship product doesn't even work! In fact, I'm going to give this to you all for free; all I ask is that you visit me one day and say thanks. Are you ready?
read article
Feb
3
2009
posted in JavaScript, Python, Ruby, Testing
I'm excited to announce the release of Fudge, a Python module for replacing real objects with fakes (mocks, stubs, etc) while testing.
Fudge started when a co-worker introduced me to Mocha, a mocking framework for Ruby and a simpler version of jMock (Java). Up to that point I had been building mocks "by hand" in Python with a post mortem approach; I'd set up some fakes then inspect their call stacks at the end of the test. I like the jMock approach better—you declare a fake object that expects methods and arguments, you replace the real object with the fake one, run your code, and you're done. If your code doesn't live up to the expectations then your test fails.
read article
Jan
24
2009
posted in Chicago, JavaScript, Python, Testing
I went to my first Chicago JavaScript meetup on Thursday (the 4th meetup they've had so far) and it looks like a promising group. The topics were pretty basic but the speakers seemed very deep into JavaScript so I'm looking forward to future meetings. By raise of hands we decided to split into two groups, an advanced and a beginner, which was an excellent idea. The turnout was incredible — about 60 (or more?) people showed up. The original venue that got canceled only held 40 so some of those people were actually on a waiting list ...
read article
Dec
3
2008
posted in Chicago, JavaScript, Python, Ruby, Testing, The Future
As the US economy spins into a death spiral I unfortunately now know some highly skilled web developers (Python, Ruby, JavaScript, etc) in the Chicago area who are looking for work. And I mean highly skilled people whose ninja like qualities will be sorely missed. Most hiring budgets are probably frozen — at least until next year — but they will soon thaw. Those that thaw sooner will make space for big prizes of talent. I can make introductions over email or via Linked In.
read article
Oct
25
2008
posted in GTAC, GTAC 2008, JavaScript, Python, Testing, The Future
This was one of the talks at GTAC 2008 that I was most looking forward to before the conference. It was excellent, I was not let down. The talk was given by Markus Clermont and John Thomas who work at Google. Since the talk was right after lunch they decided to take a Q & A approach. It sort of went off in tangents at points but overall the format seemed to work.
In my own work I've been struggling at maintaining a now bloated test suite for an AJAX website but their approach made something click in my head. I'm already working on a refactoring plan.
Here is my abbreviated interpretation of the talk ...
read article
Dec
3
2007
posted in JavaScript
read article