About Me

Migrating to Hugo

I have been meaning to move away from Wordpress to a static site generator for a very long time, due to:

  • The slowness of WP, since every page request makes multiple database calls due to the spaghetti code nature of WP and its plugin architecture. Caching can help somewhat, but it has brittle edge cases.
  • Its record of security holes. I mitigated this somewhat by isolating PHP as much as possible.
  • It is almost impossible to follow front-end optimization best-practices like minimizing the number of CSS and JS files because each WP plugin has its own

My original plan was to go with Acrylamid, but about a year ago I started experimenting with Hugo. Hugo is blazing fast because it is implemented in Go rather than a slow language like Python or Ruby, and this is game-changing. Nonetheless, it took me over a year to migrate. This post is about the issues I encountered and the workflow I adopted to make it work.

Wordpress content migration

There is a migration tool, but it is far from perfect despite the author’s best efforts, mostly because of the baroque nature of Wordpress itself when combined with plugins and an old site that used several generations of image gallery technology.

Unfortunately, that required rewriting many posts, specially those with photos or embedded code.

Photo galleries

Hugo does not (yet) support image galleries natively. I started looking at the HugoPhotoSwipe project, but got frustrated by bugs in its home-grown YAML parser that broke round-trip editing, and made it very difficult to get galleries with text before and after the gallery proper. The Python-based smartcrop for thumbnails is also excruciatingly slow.

I wrote hugopix to address this. It uses a simpler one-way index file generation method, and the much faster Go smartcrop implementation by Artyom Pervukhin.

Broken asset references

Posts with photo galleries were particularly broken, due to WP’s insistence on replacing photos with links to image pages. I wrote a tool to help me find broken images and other assets, and organize them in a more rational way (e.g. not have PDFs or source code samples be put in static/images).

It also has a mode to identify unused assets, e.g. 1.5GB of images that no longer belong in the hugo tree as their galleries are moving elsewhere.

Password-protected galleries

I used to have galleries of family events on my site, until an incident where some Dutch forum started linking to one of my cousin’s wedding photos and making fun of her. At that point I put a pointed error message for that referrer and controlled access using WP’s protected feature. That said, private family photos do not belong on a public blog and I have other dedicated password-protected galleries with Lightroom integration that make more sense for that use case, so I just removed them from the blog, shaving off 1.5GB of disk in the bargain.

There are systems that can provide search without any server component, e.g. the JavaScript-based search in Sphinx, and I looked at some of the options referenced by the Hugo documentation like the Bleve-based hugoidx but the poor documentation gave me pause, and I’d rather not run Node.js on my server as needed by hugo-lunr.

Having recently implemented full-text search in Temboz using SQLite’s FTS5 extension, I felt more comfortable building my own search server in Go. Because Hugo and fts5index share the same Go template language, this makes a seamless integration in the site’s navigation and page structure easy.

Theme

There is no avoiding this, moving to a new blogging system requires a rewrite of a new theme if you do not want to go with a canned theme. Fortunately, Hugo’s theme system is sane, unlike Wordpress’, because it does not have to rely on callbacks and hooks as much as with WP plugins.

One pet peeve of mine is when sites change platform with new GUIDs or permalinks in the RSS feeds, causing a flood of old-new articles to appear in my feed reader. Since I believe in showing respect to my readers, I had to avoid this at all costs, and also put in place redirects as needed to avoid 404s for the few pages that did change permalinks (mostly image galleries).

Doing so required copying the embedded RSS template and changing:

<guid>{{ .Permalink }}</guid>

to:

<guid isPermaLink="false">{{ .Params.rss_guid | default .Permalink }}</guid>

The next step was to add rss_guid to the front matter of the last 10 articles in my legacy RSS feed.

Welcome, baby Afsheen!

My first child, Afsheen Zahra Majid, formerly code-named “Lolo”, was born Tuesday 2012-01-03 at 10:47 AM Pacific Time in San Francisco. She weighed 4,148 grams (9.2lbs) and was 56.5cm long (20.25″) at birth. She has a full head of hair, strong lungs, and bright shiny eyes that were wide open when she came out.

Both mother and child are exhausted and recovering at California Pacific Medical Center, and learning to know one another. I can only watch with rapt attention at the miracle of life unfolding, bursting as I am with joy.

Racking up the miles

In November, I have flown from San Francisco to London, back to San Francisco, on to Auckland, Queenstown, Wellington, Auckland, back to San Francisco, Houston, back to Oakland. When combined with my upcoming trip to Bombay, I will have traveled 70,000 kilometers, or nearly twice the circumference of the Earth…

Breakfast of Popes

When I was a kid living in the forsaken wasteland that is Saudi Arabia, my father’s company would pay for one trip back to France each year. One treat my parents would give us on those trips back home, my brother and I, would be to take us to a café and get us each one of those old-fashioned teardrop-shaped bottles of Orangina. To this day, I still associate it with the taste of home.

At one point ten years ago, the owners of Orangina had agreed to sell it to Coca-Cola. This naturally raised an uproar and the deal was axed on antitrust grounds. Unfortunately, the brand has not been very well managed or marketed since and has lost much of its market share in France.

The chief quality of Orangina is that it is made with 14% fruit, unlike the synthetic garbage Coca-Cola or Pepsi sell, e.g. Fanta. It is interesting to note that in Italy, all fruit sodas are required by law to have at least 12.5% fruit content, so even Fanta is actually drinkable there.

One Italian resident who was a fan of Orangina is Mgr Ratzinger, now known as Pope Benedict XVI. At the end of his day’s work, prior to being elevated as Pope, he used to walk back home, stopping for the odd photo pose at the request of passing tourists, return to his apartment, enjoy a glass of Orangina and play Mozart on the piano for half an hour.

She said Yes

I flew into London today. I took the adorable Shaheen B. to dinner at The Ledbury.

Between courses, I asked her to marry me. She said Yes. The only plausible explanation for this lapse in judgement is temporary insanity. I couldn’t be happier.

P.S. the ring is guaranteed to be De Beers-free and not a blood diamond, courtesy of the nice folks at Brilliant Earth, who by the greatest of coincidences are just across the street from my office.

Acxiom acquires Kefta

Acxiom + KeftaI guess it’s official now. Acxiom acquired my company, Kefta, last week. Acxiom is very discreet, but influential company, with a strong technical focus — how many public company CEOs do you know who are listed as inventors on their company’s patents? The other founders and myself came to the conclusion a merger will allow us to serve our customers better, ramp up our sales to capitalize on an exploding market and enhance our infrastructure, something that would have beeen much harder if we stayed independent.

Due to confidentiality reasons, I cannot give much more specifics, but Kefta was my first startup. I thought I would have mixed feelings letting it go (I am staying on board, of course, but in a different role now). That has not turned out to be the case, however. We started in 2000, a mere two months before the bottom fell out of the market, and managed not just to survive, but to recover and thrive. At the moment, I am too excited considering the possibilities to wax nostalgic. There might be a few bumps down the road for this blog as I now have to extricate my personal web presence from Kefta’s machines (my new hosting platform is a Solaris-powered Joyent accelerator).

Update (2007-05-16):

It seems I was acquired again. Once is good fortune, twice is negligence…

What’s in my gadget bag?

Since Gizmodo isn’t going to ask me that question anytime soon, and since I haven’t written a blog entry in all of September yet, I have decided to take matters in my own hands.

I carry the following in the pockets of my jacket:

  • PalmOne Zire 72: far better ergonomics in practice than my previous Sony Clié UX50
  • A pair of Maui Jim sunglasses (changed recently from a pair of Serengeti driver’s). The shades are polarized and mirrored to minimize glare, and have an incredibly flexible and lightweight “Flexon” nitinol memory-alloy frame. I got mine in bronze tinted glasses — they are also availabe in a darker neutral gray, but the warmer tint was more comfortable.
  • A Sony-Ericsson T68i cell phone, somewhat dated but perfectly functional (this means a synchronized phone book thanks to iSync). It alsod provides my Zire 72 with Internet access via Bluetooth and GPRS.
  • A PQI Intelligent Stick 256MB USB flash drive, small enough to fit in my wallet
  • Three fountain pens in a leather case, a Montblanc Meisterstück (Aurora black ink), a Waterman Edson (Herbin Vert Pré green) and a S.T. Dupont (Private Reserve Naples blue).

My gadget bag is a Tumi expandable messenger bag. It holds:

  • Contax T3: This diminutive 35mm film camera has a superlative Carl Zeiss 35mm f/2.8 Sonnar lens. Compact digital cameras are based on small sensors with high levels of electronic noise, and are totally unsuited to low-light shooting in available light.
  • A Pedco Ultrapod mini folding tripod with a built-in ball head. Small and light, but quite versatile.
  • Leica Trinovid BC 8×20 binoculars: these ultra-compact folding binoculars have excellent optics and can be used by eyeglass wearers thanks to their innovative fold-out eyecup design.
  • A Moleskine pocket notebook
  • An Edmund Optics Hastings triplet 10x folding magnifier, with high resolution and excellent achromatic correction.
  • An Alumicolor pocket architect’s scale, metric, of course, and a self-winding tape measure.
  • A Faber-Castell e-motion mechanical pencil: its thick 1.4mm lead makes it glide across paper and its cigar shape is very ergonomic.
  • Surefire L1 LumaMax LED flashlight: I used to have mini Mag-Lites, but these flashlights, derived from military and law enforcement versions, have much more power (two beam intensities) and an even beam without dark spots. Ideal for reading. The only downside is they run off Lithium batteries, which can be hard to find (but Surefire will sell them to you in bulk at a significant discount).
  • Apple iPod 15GB, with either Etymotic Research ER-4P or Bang & Olufsen earphones. The in-ear Etymotics offer significant passive noise suppression (ideal for airplane use) but are dangerous to use in environments where you need to hear some ambient noise for safety reasons, like when you are in the street. Ordinary earphones like those supplied with the iPod don’t stay put, the clip on the B&O ones will keep them in place. They also have excellent efficiency and sound quality.
  • Böker Orion Ti-Carbone pocket knife. The Boy Scouts were started as an imperialist means of youth mass regimentation, much like the Nazi Hitlerjügend, Fascist Balilla or Soviet Komsomol. That does not make their motto “Be Prepared” less apt, and a pocket knife is always handy. While at it, why not get a good looking one like this carbon-fiber and anodized titanium-aluminum alloy one? Just remember to take it out before a flight…
  • A Socket Bluetooth GPS receiver. This tiny gizmo (smaller than my T68i) has a rechargeable Lithium-Ion battery and will last over 6 hours on a charge. Combined with the free Cetus GPS software for PalmOS, it makes a decent handheld combo that can still be used with a phone. I have yet to look closely at navigation software for the Palm.

Update (2004-09-30):

Somebody at Gizmodo clearly has a sense of humor

Update (2005-07-10):

I have altered my standard gadget bag configuration. The messenger bag is wider than deep, and does not hug the hips well, not to mention the weight. I now use a Tumi expandable messenger bag (apparently discontinued). This bag is deeper than wide, which gives it a low center of gravity and improves handling. The flap with magnetic closures looks hip, but is in practice more of a hindrance than anything (you cannot put anything substantial in the flap otherwise it stiffens and does not snap shut any more), and I am considering getting a Waterfield Designs Vertigo instead. The bag’s liner for expansion acts as a form of padding, which is just great as I now pack either a Leica MP with a 50mm Summilux-M ASPH or a Canon Digital Rebel XT with a 35mm f/1.4L.

Many gadgets from the bigger bag did not make the cut. The Edmunds loupe, Surefire flashlight, Faber-Castell pencil did. The regular Moleskine was replaced by the thinner notebook with a soft cover. The iPod — well, the only time I ever use an iPod is during long flights

Update (2012-03-16):

For some odd reason people still read this post (perhaps this has to do with the EDC craze), so I may as well post an update.

I still use the Tumi Messenger bag for work, at least when it is raining. I have way too many bags and will use one or the other depending on the mood and how much stuff I need to carry. I have also taken to wearing Scottevest jackets, which have absolutely gargantuan capacity.

My EDC camera is a Fuji X100, that I keep in my jacket pocket. Excellent optics, high quality sensor. It’s bulkier than a Contax T3, but more versatile than the Leica X1 it replaced. I keep a Manfrotto Modopocket miniature folding tripod, although I have been testing a Gorillapod Micro 800.

I replaced the binoculars with a Leica Monovid, which is lighter, and for someone with a strong dominant eye, makes little difference.

The Moleskine was replaced with a Rhodia Webnotebook with dot grid pages. The dot grid is less obtrusive than squared paper, and the Rhodia paper from Clairefontaine is leagues ahead of the kind Moleskine uses. It doesn’t feather with fountain pens, for starters.

The Surefire L1 was replaced by a tiny Fenix E05 AAA flashlight with a nice floody beam that I keep on my keychain, along with a  now discontinued Leatherman Squirt S4 (the scissors on the S4 are way more useful to me than pliers) and a minimalist PNY 16GB USB flash drive.

The iPod, Palm, GPS and cell phone were replaced by an iPhone 4 and an iPad 3. I seldom listen to music on the go, so the Etymotic ER-4P or B&W P5 headphones more often than not don’t make the cut.

I’m back on the web

My original home page, started in 1994, stopped working sometime around 96 or so when the machine it ran on, an old NeXTstation at Yale named octopus, was taken out of commission. I procrastinated on rebuilding it since.

Using a weblog tool like Radio UserLand makes it possible to rebuild my web page on a limited time budget, plus the weblog format is actually more sensible for a personal home page.

Too bad Radio doesn’t support scp or WebDAV over SSL, though.

Resume

Fazal MAJID

Profile

I am a successful entrepreneur and hands-on CTO with a proven track record in the competitive and time-driven Internet and Mobile industry. I also have international experience in the Telecommunications and Networking fields. This background gives me a unique perspective across the entire application stack.

Skills

  • Founding and growing startups
  • Building and managing engineering and ops teams
  • Project management
  • Architecting for High Scalability (Mobile, Web, Big Data and Cloud)
  • Performance optimization and application tuning
  • Network architecture, Telecommunications OSS and BSS architecture
  • Expert in Python, C and Go on UNIX platforms
  • I was granted two patents

Experience

June 2017–Present
San Francisco, CA, USA
Singular has built the only unified marketing analytics platform that delivers attribution, campaign data aggregation and creative reporting all in a single platform. Singular is the industry leader in connecting pre-acquisition to post-acquisition data to provide ROI at the highest level of granularity. Customers include Lyft, Yelp, Supercell, DoorDash, AirBnB, Match, Zynga and Postmates.

Singular Labs

CTO, Americas

Apsalar merged with Singular in June 2017.

February 2010–June 2017
San Francisco, CA, USA
Apsalar offers the most advanced mobile analytics and marketing optimization platform. We provide insight and actionable tools to help mobile app developers maximize their revenue and ROI.

Apsalar Inc.

Founder and CTO As CTO, I am responsible for the architecture, implementation and operations of the Apsalar platform, and built a top-notch engineering team to develop it.
April 2007–February 2010
Foster City, CA, USA
Acxiom is the global leader in interactive marketing services, Acxiom helps clients connect with their customers through deep consumer insight that enables effective and profitable marketing initiatives and business decisions.

Acxiom Corp.

Architect (one of only a dozen or so senior architects within the firm)

I worked on the architecture for Acxiom’s next-generation multi-channel marketing platform, integrating the Kefta technology with Acxiom’s other online marketing channels. Some of the work covered scalable, yet ultra-low latency OLTP database technology for demanding online applications, where every millisecond counts.

February 2000–April 2007
San Francisco, CA, USA
Startup, funded by Softbank Venture Capital. Kefta provided SaaS behavioral targeting and email marketing solutions that helped increase our clients’ online conversion rates and sales, often by 30%. We sold the company to Acxiom Corp. in April 2007.

Kefta Inc.

Co-Founder and Chief Technology Officer

I started the company with two partners (both Harvard MBAs), as the founder with a technology background.

I recruited, managed and mentored the engineering team (14 engineers at peak)

I defined the technology vision and led its implementation, including much of the coding.

I was the technical face of the company on client pitches and public speaking engagements.

As a founder, I was ultimately responsible for getting things done. Just one example: after an unavoidable round of downsizing in 2003, I assumed the role of sole systems and database administrator until 2005.

I led the business’ reinvention several times to ensure its survival and renewal in the face of the dot-com nuclear winter of 2000-2004, one of the most challenging environments ever for technology startups.

I ran a tight ship and found ways to stretch our infrastructure dollars. One way to achieve that was insisting on performance optimization and efficiency.

1999–2000
Amsterdam, Netherlands
Dutch commercial ISP, ran a national network with 26 POPs in the Netherlands, as well as an international backbone, with POPs in London, Brussels, Paris, Frankfurt, Washington and San Jose.

EuroNet Internet BV

Technical Director, Operations Manager, deputy to the CEO and interim CIO.

I performed technical due diligence for France Telecom’s acquisition of the company in 1998, and stayed on to overhaul it.

I managed the core operations department with a 1999 budget of €5M in capital expenditures, €4.5M in operating expenses, and over 20 employees.

I upgraded the technical platforms (service, network and IS), reorganized operations and project management.

I limited post-acquisition turnover and recruited to stabilize the workforce, while shedding non-strategic activities such as custom web development.

I led the design of the long-term technical architecture for data services (IP and ATM) for all of France Telecom’s Dutch affiliates . The first phase was an ambitious IP over SDH network of Cisco 12000 and 7500 routers, spanning over 29 POPs in the Netherlands, with an initial capacity of 155 Mbps and scalability to 40 Gbps.

June 1996–1999
Paris, France
The division of France Telecom that operated Wanadoo (now rebranded as Orange), the premier Internet Service Provider in France and second-largest in Europe.

France Telecom Interactive (FTI)

Deputy to the Vice-President of Engineering. Acting as Chief Technology Officer for the division.

I designed Wanadoo’s technical architecture to scale to 1 million subscribers and beyond by 1999, ran the RFPs and oversaw their implementation. This included the network architecture, the web portal and email services platform, the Business Support System (provisioning, billing and CRM) and the OSS. The first phase was completed in August 1997, the second in February 1999, when it served over 560.000 dialup, cable and ADSL subscribers. FT was still using the same basic architecture for over 5 million subscribers across all retail Internet services, as recently as 2007.

I set up much-needed QA and project management groups, to improve reliability, quality of service and reduce time to market for introducing new features.

September 1994–June 1996
Caen, France
A joint France Telecom and French Post Office R&D lab, covering Internet, messaging, groupware, smart card, RFID and payment technologies.

Service d’Études Communes des Postes et Télécommunications (SEPT)

Project Manager I led Project Mercure to produce a prototype ISP platform for FT with electronic commerce capabilities, as a successor to the legacy French Minitel system. The project was successfully completed, on time and within budget, in collaboration with Netscape Communications, with a total budget of €500K and a staff of 15 engineers. The payment feature was patented and later commercialized in Wanadoo. It was generating well over €2M in yearly revenues by 2002.

Education

1992–1994
Paris, France

Télécom Paris (French National Higher Institute for Telecommunications)

MS in Telecommunications Engineering

Telecom ParisTech is one of France’s leading graduate engineering schools and is considered the school in the field of IT.

1992, 1993
New Haven, CT, USA

Yale University Mathematics Department

Research Assistant

I investigated noise reduction using wavelet packet analysis, leading to an international publication and a scientific software package. My research was awarded first prize for Mathematics in 1992 by the École Polytechnique.

1989–1992
Palaiseau, France

École Polytechnique

MS in Mathematics and Computer Science

The top French engineering institute or “Grande École”. It has trained France’s scientific and industrial elite and the upper echelons of its civil and military services since its inception, and it continues to do so today. Of the fifty most important corporations in France, nearly half are headed by a polytechnicien.

Skills detail

Patents granted

Videotex emulator in Java (French patent 96 04263 / FR 2 747 258 - A1).

Web-oriented Pay-per-view system (International patent WO 99/03243).

Technology stacks

Highly proficient

  • Python, Python C extension modules, Pyrex
  • C, Go
  • Java, Scala, Ragel
  • HTML5, CSS, HTTP, JavaScript, AJAX, Comet, CGI, FastCGI, PHP, DOM, XML, JSON, RSS/Atom, Wordpress extensions and themes, Postscript
  • PostgreSQL, PL/pgsql, PL/proxy and writing C extensions for PostgreSQL
  • iOS (Objective-C) and Android mobile app development
  • Apache Spark
  • nginx extension programming
  • Solaris, OS X, OpenBSD, FreeBSD, Linux, Juniper JunOS and Cisco IOS administration
  • UNIX systems and network programming
  • PostgreSQL, MySQL DBA
  • Git

Somewhat rusty

  • C++, R
  • Oracle SQL, PL/SQL, Pro*C, OCI and JDBC, MySQL, SQLite
  • Apache, NSAPI and AOLserver extension programming
  • Tcl/Tk, Tcl C extensions and embedding
  • Oracle, Sybase and SQL Server DBA
  • CORBA, AMQP, XML-RPC
  • X11/Athena and Motif
  • Microsoft Project, including VBA extensions
  • RCS, CVS, Subversion, Mercurial
  • Memcached, Postfix, Dovecot, Cyrus, BIND, DJBDNS, Unbound, SAMBA admin
  • SNMP, NetFlow, MRTG, Cacti
  • VMware, Xen, Solaris 10 Zones, Parallels and VirtualBox
  • Amazon EC2 and AWS
  • Windows programming (Win32/C++)

Languages

Native French, English and Urdu speaker.

Intermediate German. Basic Dutch and Japanese.

International exposure

  • 2000–Present: San Francisco, California, USA
  • 1999–2000: Amsterdam, Netherlands
  • 1992, 93: New Haven, Connecticut, USA
  • 1982–85: Tokyo, Japan
  • 1981: London, England
  • 1978–80: Riyadh, Saudi Arabia
  • 1970–78, 80–81, 85–2000: Paris, France