2346 stories
1 follower

Rendering Spectrum | CSS-Tricks

1 Share

Sensible advice from Chris:

So what’s the best rendering method? Whatever works best for you, but perhaps a hierarchy like this makes some general sense:

  1. Static HTML as much as you can
  2. Edge functions over static HTML so you can do whatever dynamic things
  3. Server generated HTML what you have to after that
  4. Client-side render only what you absolutely have to


Read the whole story
7 hours ago
Hamburg, Germany
Share this story

Native Aspect Ratio Boxes in CSS thanks to aspect-ratio

1 Share

Old vs. New. Image by @una.


Back in May 2020 I was very delighted to read that the first Working Draft of the CSS Box Sizing Module Level 4 got published, as it featured an addition to CSS that I’ve been wanting for a long time now: native support for aspect ratio boxes through the new aspect-ratio CSS property.

With Chromium 89 (current Canary) and Firefox 85 (current Nightly) already supporting aspect-ratio unflagged, it’s time to start playing with this new addition and start thinking about dropping all those nasty hacks to mimic aspect ratios in CSS. Let’s take a look …

πŸ€” Working Draft (WD)?

The Working Draft (WD) phase is the first phase of the W3C Recommendation Track, and is considered the design phase of a W3C spec.

From thereon a spec can become a Candidate Recommendation (CR) to finally land on being a Recommendation (REC). In between those three stages there are two transition stages: Last Call Working Draft (LCWD) and Proposed Recommendation (PR)

In visual form, the Recommendation Track looks something like this:

See An Inside View of the CSS Working Group at W3C for more details on all phases.

⚠️ Note that the current implementations in both Firefox Nightly and Chrome Canary are not finalised yet (most likely due to the spect still being a WD?). You can track these bugs to stay up-to-date:


Welcome aspect-ratio

In short, the aspect-ratio property allows you to define a preferred aspect ratio on elements:

.box {
  width: 20vw;
  aspect-ratio: 16 / 9;

[CodePen Demo]

In the example above the .box will have a preferred aspect ratio of 16:9. Since its width is set to 20vw, the resulting height will be 20vw / 16 * 9 = 11.25vw. Easy, right?

🀞 Psst, further down this you can find a demo that includes a fallback for browsers that don’t support aspect-ratio πŸ˜‰


Allowed values for aspect-ratio

The value as set in the example above for aspect-ratio is of the <ratio> type:

  • It typically consists of two numbers separated by a /. The first parameter targets the width and the second one the height.
  • It’s also allowed to pass in just a single number. In that case the second number will be we considered to be 1. E.g. a <ratio> of 2 will translate to 2 / 1.
  • Passing in a 0 for either of the numbers is not allowed.
  • The spaces around the / are not required, so 2/1 is also a valid <ratio> value.

Another allowed value for the aspect-ratio property β€” which also is the default β€” is auto. This indicates that the box has no preferred aspect ratio and should size itself as it normally would.

πŸ™‹β€β™‚οΈ Hold up! How come images already behave correctly, without needing to define an aspect-ratio?

Images may be commonly used, but they are a quite uncommon type of HTML element:

  1. Images are replaced elements:

    A replaced element is an element whose content is outside the scope of the CSS formatting model, such as an image or embedded document. For example, the content of the HTML <img> element is often replaced by the image that its src attribute designates.

    Just check your DevTools: the browser will make an extra HTTP request for any image and fetch its contents separately. Once loaded, the browser will replace the original img tag with the actual image contents.

  2. Images have an intrinsic aspect ratio:

    The intrinsic dimensions represent a preferred or natural size of the object itself; that is, they are not a function of the context in which the object is used.

    Each photo that you take with your phone results in an image that has a certain width and height, which is referred to as the intrinsic or natural width/height. The intrinsic aspect ratio is the ratio between the intrinsic width and intrinsic height.

    When the browser has fetched the image and needs to draw it on screen it will take its intrinsic aspect ratio into account to know how big it should be drawn.

☝️ Do note that you can still set an aspect-ratio on an element that has an intrinsic aspect ratio. In that case your defined aspect-ratio will override the intrinsic aspect ratio.


The fine print

Setting an aspect-ratio won’t have effect on elements that have both a CSS width and CSS height set to a value other than auto. Only one of width or height can be explicitly set, and the other should remain set to auto.

.box {
  width: 20vw;
  height: 20vw;
  aspect-ratio: 16 / 9; /* won't work! */

Depending upon which of width or height you set, the box dimensions will be calculated against that.

.box {
  width: 20vw;
  aspect-ratio: 16 / 9; /* Dimensions will be calculated against the width,
                           yielding a height of 11.25vw (20vw / 16 * 9) */
.box {
  height: 20vw;
  aspect-ratio: 16 / 9; /* Dimensions will be calculated against the height,
                           yielding a width of 35.55vw (20vw / 9 * 16) */



Using aspect-ratio with a fallback for older browsers

Thanks to the powerful @supports it’s possible to add a fallback for browsers that don’t support aspect-ratio. In the demo below (based upon this demo by Una) a fallback using the padding-top hack is applied:

[CodePen Demo]

Using aspect-ratio with CSS Variables

By introducing a CSS Variable CSS Custom Property it’s possible to make your code more generic and extract away a .aspect-ratio class.

[CodePen Demo]

To use it, add apply the .aspect-ratio on the element you want, and pass in a --aspect-ratio CSS Custom Property:

  style="--aspect-ratio: 16/9;"
>I am an aspect ratio box</div>

The code is written so that it will use the value for --aspect-ratio in both the fallback and the modern version.

Automatically setting aspect-ratio on iframes and the like

When you embed an iframe you most likely set its width and height HTML attribute.


It’s possible to use the values of these attributes to automatically set the aspect-ratio.

iframe[width][height] {
  aspect-ratio: attr(width) / attr(height);

Heck, you could even target [width][height] if you’d want!

[CodePen Demo]

πŸ› I’ve noticed that reading the width/height attribute values using attr() to pass them into aspect-ratio doesn’t work in current Chromium. To cater for that I’m also passing their values by means of a CSS Custom Property …

  style="--aspect-ratio: 560 / 315"
πŸ™‹β€β™‚οΈ Why doesn’t this iframe demo have a padding-top fallback injected using :after?

Just like images, iframes also are replaced elements. It’s not possible to inject contents using :before/:after on replaced elements.

If you really need to have a fallback, you need to wrap the iframe in a container and apply the aspect-ratio on the container. See Embed Responsively and adjust were needed.


In Closing

After 8 years of wanting this feature to land in CSS (ref) I’m very happy to see this addition make it into the spec. It’s still a Working Draft right now, but that doesn’t stop me from being excited about it already. I hope you are too πŸ™‚

Did this help you out? Like what you see?
Thank me with a coffee.

I don't do this for profit but a small one-time donation would always put a smile on my face. Thanks!

β˜•οΈ Buy me a Coffee (€3)

Read the whole story
8 hours ago
Hamburg, Germany
Share this story

Anti-Mask League of San Francisco

1 Share

1919 San Francisco organization

Barbers in California wearing masks during the epidemic

The Anti-Mask League of San Francisco was an organization formed to protest an ordinance which required people in San Francisco, California to wear masks during the 1918 influenza pandemic. The ordinance it protested lasted less than one month before being repealed. Due to the short period of the league's existence, its exact membership is difficult to determine; however, an estimated 4,000–5,000 citizens showed up to a meeting to protest the second ordinance in January 1919.[1] Opposition to similar ordinances during the COVID-19 pandemic in the United States led to renewed interest in, and comparisons with, the Anti-Mask League.[2]


Cases of the Spanish flu began to appear in San Francisco during the fall of 1918. The first documented case was in late September; by mid-October, the city had more than 2,000 cases (~400 per 100,000). The city's Board of Health enacted various measures to try to curb the disease, such as banning gatherings, closing schools and theaters, and warning citizens to avoid crowds. Professions that served customers (including barbers, hotel and rooming house employees, bank tellers, druggists, store clerks) were required to wear masks. On October 25, the city passed an ordinance requiring everyone in San Francisco to wear a mask while in public or when in a group of two or more people, except at mealtime.[3]

Initial compliance with the mask ordinance was high with an estimated 80% of people wearing masks in public. The Red Cross sold masks at the ferry terminal for incoming passengers. Anyone who failed to wear a mask or wore it improperly was charged with disturbing the peace, warned and for subsequent violations, fined or jailed. The city health officer and the mayor both paid fines for not wearing masks at a boxing match.[3]

The mask ordinance was annulled effective November 21, 1918; however, when cases of the flu began to increase again, a new ordinance mandating masks took effect January 17, 1919.[3]

League formation[edit]

Although there were some complaints from citizens during the initial period of mask-wearing, the new ordinance in 1919 galvanized more serious opposition and the Anti-Mask League was formed.[3] Members of the league included physicians, citizens,[4] civil libertarians,[5] and at least one member of the Board of Supervisors.[3] An estimated 4,000–5,000 citizens attended the meeting on January 25.[1][6] Some members of the league wanted to collect signatures on a petition to end the mask requirement, while others wanted to initiate recall procedures for the city health officer. Members of the anti-mask league also agitated for San Francisco Mayor James Rolph, Jr., to resign if he did not repeal the ordinance. The president of the League, suffragist, attorney, and labor rights activist Mrs. E.C. Harrington, was a fierce critic of the mayor, and it has been suggested that the anti-mask league protests were politically motivated.[7] The debate was heated.[4] Some objections to the ordinance were based on questions of scientific data while others considered the requirement to infringe on civil liberties.[8]

In addition to complaints from the Anti-Mask League, some health officers from other cities also contended that masks were not necessary.[4] The San Francisco city health officer criticized the secretary of the state's Board of Health for questioning the efficacy of masks, saying "The attitude of the state board is encouraging the Anti-Mask League."[9]

On January 27, the league presented a petition, signed by Mrs. E. C. Harrington as president, to the city's Board of Supervisors, requesting repeal of the mask ordinance.[10] Newspapers across the world took note of the protesting organization.[11][12][13][14] San Francisco lifted the mask requirement effective February 1, 1919, on the recommendation of the Board of Health.[4]

Historical analyses and comparisons[edit]

A study then in 1919 concluded that mandatory mask mandates did not make any difference on epidemic, while observing that a likely reason for their ineffectiveness was that masks were worn outdoors and not inside in gatherings when conditions for transmission would be greatest. It also noted that most masks were improperly constructed of inadequate materials.[15]

However, according to medical historians, the decline in deaths from influenza in San Francisco can be partly attributed to the mandatory mask-wearing policies.[16]

During the COVID-19 pandemic in the United States, opposition to the wearing of face masks and anti-lockdown protests led to comparisons with the Anti-Mask League.[17][2][18]

See also[edit]


  1. ^ Jump up to: a b "Big Mass Meeting Condemns Masks". Logansport Daily Tribune. February 14, 1919. p.Β 8.
  2. ^ Jump up to: a b Kane, Peter Lawrence (April 29, 2020). "The Anti-Mask League: lockdown protests draw parallels to 1918 pandemic". The Guardian. ISSNΒ 0261-3077. Retrieved June 27, 2020.
  3. ^ Jump up to: a b c d e "San Francisco, California and the 1918-1919 Influenza Epidemic". University of Michigan Center for the History of Medicine: Influenza Encyclopedia. Retrieved April 19, 2020.
  4. ^ Jump up to: a b c d Crosby, Alfred W. (July 21, 2003). America's Forgotten Pandemic: The Influenza of 1918. Cambridge University Press. pp.Β 112–113. ISBNΒ .
  5. ^ Torrey, E. Fuller; Yolken, Robert H. (February 3, 2005). Beasts of the Earth: Animals, Humans, and Disease. Rutgers University Press. ISBNΒ .
  6. ^ Canales, Katie. "Photos show how San Francisco emerged from a lockdown too soon during the 1918 Spanish flu pandemic, leading to an even deadlier second wave that rampaged through the city". Business Insider. Retrieved April 22, 2020.
  7. ^ Dolan, Brian (2020). "Unmasking History: Who Was Behind the Anti-Mask League Protests During the 1918 Influenza Epidemic in San Francisco?". Perspectives in Medical Humanities.
  8. ^ Jr, Samuel K. Cohn (2018). Epidemics: Hate and Compassion from the Plague of Athens to AIDS. Oxford University Press. p.Β 440. ISBNΒ .
  9. ^ Municipal Journal. Municipal Journal and Engineer, Incorporated. 1919. p.Β 111.
  10. ^ Supervisors, San Francisco (Calif ) Board of (1919). Journal of Proceedings, Board of Supervisors, City and County of San Francisco. Recorder Printing and Publishing Company. p.Β 50.
  11. ^ "Anti-Mask League in San Francisco". Perth Truth. April 27, 1919. p.Β 11.
  12. ^ "18 Jan 1919, 1 - The Victoria Daily Times at Newspapers.com". <a href="http://Newspapers.com" rel="nofollow">Newspapers.com</a>. Retrieved April 20, 2020.
  13. ^ "19 Jan 1919, Page 8 - Statesman Journal, Salem, Oregon at Newspapers.com". <a href="http://Newspapers.com" rel="nofollow">Newspapers.com</a>. Retrieved April 20, 2020.
  14. ^ "You Don't Say So". The Macleay Chronicle, New South Wales. April 30, 1919. p.Β 4.
  15. ^ Kellogg, Wilfred (January 1919). "A study of measures adopted for the control of the epidemic,P.12ff". Hasthi. Retrieved September 14, 2020.
  16. ^ Strasser, Bruno J.; Schlich, Thomas (May 22, 2020). "A history of the medical mask and the rise of throwaway culture". The Lancet. 0 (10243): 19–20. doi:10.1016/S0140-6736(20)31207-1. ISSNΒ 0140-6736. PMCΒ 7255306. PMIDΒ 32450110.
  17. ^ Hartlaub, Peter (May 8, 2020). "Anti-Mask League: San Francisco had its own shutdown protests during 1918 pandemic". <a href="http://SFChronicle.com" rel="nofollow">SFChronicle.com</a>. San Francisco Chronicle. Retrieved June 27, 2020.
  18. ^ Smith, Kiona N. (April 29, 2020). "Protesting During A Pandemic Isn't New: Meet The Anti-Mask League Of 1918". Forbes. Retrieved June 27, 2020.
Read the whole story
9 hours ago
Hamburg, Germany
Share this story

Making PlayStation 1 Modchips

1 Share

When I was young I owned a PlayStation 1 (PS1). It was one of the first, if not the first, game consoles I owned and it had a profound effect on my future.

I can trace the history of how I got involved in computers back to playing and modding video games. While I wasn't smart enough to mod game consoles when I was young, my dad wasn't bad at it. He modded my PS1 to have a little switch in the back that would allow it to play burnt games. They say the apple doesn't fall far from the tree.

Fast-forward to today and I no longer have my original PS1. I remember some games wouldn't load anymore and I had gotten a PS2. So why keep an old console? Turns out the answer is nostalgia and memories. You miss what you don't have anymore.

Recently a friend gifted me a PS1. And so then the journey begins, how do I mod this thing?

If you are looking for them I am selling flashed, prewired modchips.

Very simply, the principles behind PS1 DRM work as follows:

  1. Sony baked (not the technical term) strings (i.e. SCEA, SCEI, SCEE, or in rare cases SCEW) into official PS1 games in locations which cannot be replicated by a regular reader. This video and this post discuss it reasonably well.
  2. The CD drive controller looks for those strings to identify a disc as official. Once the controller decides that the disc is/isn't official, the main CPU reads this decision and acts accordingly.
  3. If the string can't be found or is garbled, the PS1 knows the disc isn't an authentic PS1 game. However, because the PS1 needs to account for disc read errors, there's a good amount of leeway in what passes the authenticity check.
  4. Because region (A for America, I for Japan, E for Europe, and W for Net Yaroze) as well as authenticity are rolled into one string, Sony kills two birds with one stone here and achieves region locking as well as copy protection.

If you want a real in-depth discussion you can read the original posts by The Old Crow or the No$PSX documentation page or this Modchip FAQ

PSX modchips work by electrically stifling the output originally generated by whatever CD is inside the drive and then injecting a new, faked signal into the CD microcontroller. This causes the PS1 to believe that whatever disc is inside is legitimate and proceed to boot up.

Later on Sony added more complicated checks like:

  • Checking for the magic strings during the game instead of at boot
  • Changing the overall process to make it more difficult to bypass by simply emitting the correct strings.

However, modern modchips already deal with this. Modchips that work under these updated circumstances are known as "stealth modchips" because the console shouldn't be able to detect them at all.

The first "open source" modchip was reverse engineered by a guy named "The Old Crow". Surprisingly, The Old Crow specializes in electronic music synthesizers, not hacking video game consoles. It's from his modchip that most other modchips are derived from in some sense. He originally reverse engineered a commercial PS1 modchip that was designed by a western engineer working for a Chinese company.

Today, there are three main modchips which are still used by the community today.

The modchips include:

The three have their pros and cons but generally they can be summarized as follows:

  • MM3 is the most common PS1 modchip seen/used today. Its only real downside is that it uses an internal oscillator which can become out of sync with the oscillator used by the CD drive. If this happens you simply need to reboot your console to try reading again.

  • Mayumi v4 attempts to use the oscillator used by the CD drive. This reduces the chance of the oscillator sync issue from happening; however, Mayumi v4 is considered a bit difficult to install.

  • PSNee is an open source modchip originally written by TheFrietMan. Development on it was later continued by others and it appears to work rather well on all Playstation 1/PSOne models. Based on the code I believe it attempts to infer where the PS1 is in the boot process to begin injecting fake SCEX strings. Unfortunately PSNee is complicated to install. The provided diagrams are atrocious and nowhere near as simple as the available diagrams for MM3 and Mayumi. I worked out the pinout for the Attiny45 but I ended up going with MM3 and Mayumi because it's easier.

If you want them I am selling flashed, prewired modchips.

It's generally pretty easy to make a PS1 modchip provided you have the right tools. In this tutorial we will focus on making MM3 or Mayumi v4 modchips.

While I do have an Arduino, I prefer to use the MM3 and Mayumi chips over PSNee. If you want to make a PSNee modchip, you can follow the instructions here to flash the .ino file to your Attiny.

You will need:

Many tutorials call for the PIC12C508. This is an old model and continuing to use them is unnecessary unless you have them stockpiled. HEX codes that work for the 12C will work for the 12F.

To begin you should first look your IC and determine which leg is which. The leg nearest the imprinted circle is Pin 1. The leg opposite it is Pin 8.

You can plug this into a bread board and then wire it into the Pickit according to the following diagrams. You want to match the following (the rest are unused for now):

  • PICKit 1 ⟷ IC 4 (VPP)
  • PICKit 2 ⟷ IC 1 (VDD)
  • PICKit 3 ⟷ IC 8 (VSS)
  • PICKit 4 ⟷ IC 7 (ICSPDAT)
  • PICKit 5 ⟷ IC 6 (ICSPCLK)

Once you've properly wired up the chip, connect the PICKit to your computer and start MPLAB IPE. Under Device select PIC12F508.

Go into Settings > Advanced Mode. The default password for Advanced Mode is microchip. I don't recommend changing it, not sure why the option is even available.

Go into the Power tab on the left and enable Power Target Circuit from Tool.

Go back to the Operate tab and hit Connect.

From here download the appropriate HEX code for your chip and console. They are different per console region.

You can also use Mayumi v4 on the PIC12F508 if you choose.

In the Source file, select your hex code.

Hit the big Program button.

You should see something similar to the following text:

2018-06-20 20:48:02 -0400 - Loading hex file. Please wait...  
Loading code from /Users/kchung/Repositories/PsNeePy.wiki/hexcodes/mm3/MM3USA.HEX...  
2018-06-20 20:48:03 -0400 - Hex file loaded successfully.

2018-06-20 20:48:20 -0400 - Programming...

Device Erased...


The following memory area(s) will be programmed:  
program memory: start address = 0x0, end address = 0x1e7  
configuration memory  
Programming/Verify complete  
2018-06-20 20:48:25 -0400 - Programming complete  

If you'd like, you can hit the Verify button to make sure that your flash was correct. Your output should look something like the following:

2018-06-20 20:50:10 -0400 - Verifying...


The following memory areas(s) will be verified:  
program memory: start address = 0x0, end address = 0x1ff  
configuration memory  
User Id Memory

Verification successful.  
2018-06-20 20:50:13 -0400 - Verify complete  

From here you can follow online diagrams for soldering your chip to the PSX that you own. I personally used William Quade's excellent diagrams and think you should as well.

While looking at all these modchips, I figured it would be nice to read and write Python code instead of Assembly and C code so I started working on porting PSNee to Python.

By using MicroPython and an ESP8266 we can actually create a modchip that we can remotely update and modify through the ESP8266's WiFi.

In the above photo (SCPH-7501), the ESP8266 is on the top left with the headers face up. The wires connect to the headers and route under the CD drive to a breadboard on the bottom right.

The breadboard has wires that are soldered to the correct MM3 points and then labeled with the corresponding pin number. By using this breadboard I can test modchips that I make much faster than soldering to the board over and over again.

My modchip (named PsNeePy) is available on Github:

While my test console is quite bad at reading discs and the console rarely boots into games, the modchip does work.

For the most part (ignoring stealth functionality), modchips are known to be working once you reach the black Playstation logo screen as this indicates that the CPU considers the game authentic.

However, because the code is based off an older version of PSNee, stealth functionality does not seem to work on some newer PS1 revisions.

I mostly created this as a proof of concept and I'm unlikely to maintain it very much. While I don't recommend using my modchip, I hope that the community adopts it and helps improve it. Despite being a dead console, the PSX community is fairly active.

With PsNeePy, you can remotely update the ESP8266 over WiFi, debug remotely, and also reset the chip easily. Having spent many hours working on the PS1 at this point, a more modern experience is quite refreshing.

Thanks to an anonymous friend for my PS1, Sharan for fixing my PS1, William Quade for the excellent diagrams, AssemblerGames for having good information despite not accepting me into the forum, and PSXDEV for answering some of my questions.

Read the whole story
9 hours ago
Hamburg, Germany
Share this story

Why Older People Struggle In Programming Jobs

1 Share

I'm old. I'm OK with it. I don't lay awake at night worrying about it. But I do understand quite well that I'm definitely old - at least, in a "programming" sense.

Most outside this career field would laugh at the idea that I'm old. In most careers, being in your mid-40s is the prime of your professional powers. But in software development, anyone north of 40 is often viewed with some suspicion. Anyone north of 50 is frequently weeded out of the resume pool. And anyone 60+ had better have a very solid retirement strategy in place.

But this isn't an article about outward bias against the Olds. This article is about the fact that "more-experienced" devs do often have a tougher time adjusting to any particular job / task / environment.

It's not just bias. It's real. I've experienced it firsthand. I've seen it in others. I've felt it in my soul.

I don't know if this will help anyone. In any way. But I feel compelled to point out (some of) the reasons why Olds like me find it increasingly more difficult to simply fit in - let alone, excel.

I don't claim to speak for all Olds. And I'm not saying that there aren't some aging devs out there who are absolutely thriving in their environments. The following observations are mine and mine alone. Your mileage may vary.

Alt Text

Political Fatigue

When I was younger, I was content to play all of the standard corporate political games. Heck, at times, I even enjoyed them. But nowadays...? Well, let's just say that I've become the polar opposite of a political player - and my unwillingness to "play along" frequently causes tangible problems in my job.

I used to be in management. At one point, I had 60 devs, organized in 6 different teams, that all reported up through me. At that time, I was much more concerned with making sure that I couched my thoughts in the "right" verbiage. I was much more inclined to burn hours writing reports (that I knew would never be read) and checking off audit boxes (that I knew no one really cared about).

About 5 years ago, I purposely stepped away from management. I wanted to "just" be a coder again. I wanted to get as far as possible from standard corporate politics and allow myself to overdose on code.

But a funny thing happened on my way to being "just" a coder again. The politics seems to have... followed me. On a good day, I'm doing nothing but staring at my IDE. But on far too many days, I find myself expected to tell executive management what they want to hear. On far too many days, I'm still bogged down in meetings and endless administrative details.

Since I'm griping about this here, you might have the impression that I'm one of those Cranky Olds. You know, the guy who's gotta complain about every decision - no matter how trivial. However, I don't think this describes me at all.

I'm perfectly happy talking to "the business" or "the client" or "the stakeholders". And I can typically talk to them in a manner that avoids techno-babble and doesn't demean anyone. People can ask me for all manner of questionable deliverables - and I calmly explain to them, in laymen's terms, how those deliverables could have nasty unintended consequences down the road.

For weeks, or even months, on end, these interactions cause me no problem whatsoever. But then it happens...

It is that moment when someone wants you to do something in the code that, quite literally, makes absolutely no sense at all. But they don't just tell you to do it. They fervently ask for your opinion. They insist on making you feel like you've contributed - even when your only logical contribution is to say that this whole idea is batshit-crazy.

But you can't tell them that it's batshit-crazy. In fact, you can barely tell them anything at all - unless it backs up their original request. That's because they keep soliciting your feedback. But they don't want your feedback. They just want you to nod along and do whatever crazy thing they've asked.

When I was younger, I had a much easier time swallowing my objections in cases like these. But nowadays...? Well, while it's easy for me to avoid being abusive or confrontational, it's not easy for me to couch my feedback in such milquetoast terms that the bigwigs can delude themselves into believing that I support the idea.

I don't yell at anyone. I don't use unprofessional language. But you'd better believe that if you ask me what I think of an idea that is truly, epically stupid, I'm going to tell you, in no uncertain terms, that it's a horrible idea. It's amazing how often this simple tendency causes me repeated headaches in my work.

Alt Text

Rejecting the Churn

With every year that slides into my rearview mirror, my patience for technology's relentless "churn" grows a little thinner. That sentence probably makes me sound like a dinosaur. But I'm not complaining about learning or adopting new technologies. (Like nearly any programmer, the process of learning new tech is usually exciting to me.)

I'm complaining about (what I perceive to be) an accelerating trend to throw out established tech - and dive headfirst into new tech - often for no better reason than the fact that someone really likes the new tech (or really dislikes the old tech). If you've read some of my other articles, you might've noticed my frequent use of the term: fanboy.

If you're hyping any particular tech, but you can't make a cogent empirical argument for that tech, you're probably a "fanboy". If you're badmouthing some other tech, but your primary argument against it is that it's old or stupid, you're probably a "fanboy".

Fanboys may sound like a harmless hazard of this line-of-work. But fanboys can cause real damage. If the fanboy is some little-respected kid right out of college, his irrational passions probably won't cause any real problems. But fanboys can be anywhere.

Your manager can be a fanboy. The ivory-tower architect who's friends with the CIO can be a fanboy. The guy who's been working for the company for the last 20 years can be a fanboy. Heck, even the CEO could be a fanboy.

And once the fanboy decides that they hate the tech you're currently working in (the tech that you've probably invested thousands of hours into), and once they have the ear of the decision-makers, it's only a matter of time until you'll be rewriting all your stuff. Or you'll be looking for a new job.

This "churn" doesn't just apply to top-level tech. It can apply to NPM packages. Or style guides. Or... any trivial aspect of our work. And once the opinion in your shop has "evolved", you'll find yourself having to radically change the basic way in which you do your work. Or you'll be looking for a new job.

Do you wanna know why something as (supposedly) trivial as tabs-vs-spaces can still, to this day, infuriate people? It's because you have some people who have been coding with tabs/spaces for years and it's never been a problem. And then one day, someone walks in and says, "OMFG! I can't believe you're still using tabs/spaces!" Pretty soon, you need to follow the herd on whatever trivial decision has been made - for you. Or you'll be looking for a new job.

Please don't confuse this section to mean that I don't want to learn new tech (or techniques). I'm as excited as the next programmer to dive into something that promises to solve a problem. But I'm not excited to switch out languages / frameworks / tools / etc. just because the old way is supposedly "stooopid" and the replacement is supposedly the New Hawtness.

Alt Text

The Cynicism of Experience

When I started in this career, I can think of many instances where my naivete was almost... an asset. You see, sometimes I was too stupid to realize I was being used. But in the process of being "used", I also gained valuable experience. Or I impressed the hell out of the people who saw me breaking my back to make everything work.

In my 20s, any slight suggestion that extra work was needed would lead to me pulling a 24-hour coding marathon. Or working through the weekend. Any suggestion that we adopt some (counterproductive and poorly-supported) technology would lead to me diving in headfirst to learn-and-implement said technology. Any hint of stock options or future IPOs would get me all giddy thinking that I was working for the next Google and I could work myself nearly-to-death - because... I'd be rich!!!

Nowadays...? Well, let's just say that I'm more discerning with my efforts.

I will (and frequently do) work overtime. But the moment I get the sense that my willingness to work overtime is being abused, we're gonna have a little chat. And if our team loses someone, and the company's "solution" is to simply spread the work onto the remaining employees - while keeping all the due dates the same - you can guarantee that I'll be telling everyone, very clearly, that I will not be absorbing someone else's entire workload.

I don't get all giddy anymore about the empty promises of most companies (especially startups). If the comp package includes some stock options, that's great. But if you expect me to consider those options to be all, or a major component, of my comp, then I suggest you start recruiting at the local colleges. I have mortgages (plural). I have bills and commitments. And even if I like your company, I promise I don't like it so much that I'm willing to forgo a market-rate salary.

Here's another scenario where my experience (cynicism) can sometimes cause me problems:

Once you get a reputation in an organization as a proficient coder who can really get stuff done, you can suddenly find many "off the books" requests landing in your lap. I'm talking about those scenarios where someone outside your team's pipeline comes over and starts saying things like, "Hey... How difficult would it be to make this one little change to this app??"

20s Adam would get all excited about those kinda requests. A few brief meetings and I might end up working nights-and-weekends just to implement some kinda guerilla project. Sometimes I'd do it because I was excited about the tech. Other times, I'd do it because I was eager to please. In a few cases, I even got in trouble for doing it. But I almost always found that the boost within the company to my reputation was well worth any short-term blowback.

These days, I rarely indulge these folks. You know the ones. The people who figure that they can completely subvert the dev pipeline by directly cozying up to one of the programmers.

I've had executives try to do this to me (who were, nevertheless, completely outside of my chain-of-command). I've had young ladies try to do this to me, sitting closer to me than is natural and smiling at me more than anyone truly wants to smile at me.

But these days, my response to these folks is always exactly the same. I listen politely to them. I provide any immediate feedback I can which might help to steer them in the right direction. But as soon as they want to push me to actually do the work - outside of the normal dev pipeline - I politely (but firmly) decline.

This may sound like the "right" way to handle this situation. But I've noticed that once I tell someone "no", it tends to come with all sorts of long-term side effects. I've had managers tell me, in performance reviews, that I'm "difficult to work with". Yet when I try to figure out where this assessment came from, it turns out that it's from the same people who were trying to get me to subvert the normal flow of things.

In fact, it's amazing to see some of the stunned looks on peoples' faces any time I tell them, in a professional and unemotional tone, "No. I won't be doing that." Or, "You'll have to talk to the project manager about that." Or, "You'll need to negotiate that priority directly with the client."

For some people, it doesn't matter how professional (or justified) you are. They will still hold a grudge against you if you dare to deny their request.

Alt Text

Little Tolerance For Double-Speak

Maybe this doesn't much bother the Olds. Maybe it just bothers me. I'm not sure. But I know that, over the last 2+ decades of corporate work, my patience with blatant corporate double-speak has steadily dwindled.

To be clear, I understand that corporations have their own vernacular. It doesn't bother me when someone says that we should "touch base offline". And "think outside the box" is a hackneyed (and near-meaningless) phrase, but when someone spews those words, I pretty much know what they're trying to communicate.

But if you tell me that we need to do some "right-sizing", I'm gonna vomit a little bit in my mouth. If you keep preaching to me about being a "disruptor", I know that your idea of "disruption" is for me to work nights-and-weekends to realize your vision. If you ask me to take an "action item", it's your subtle way of trying to assign new work to me without consideration for current project priorities.

I could go on, but you get the point. I've really grown to hate this incessant need to doctor distasteful ideas in some vague form of New Speak.

This hang-up of mine is particularly glaring when someone wants me to chime in on a proposal - and that proposal has no redeeming factors. I can pretty much talk around most potential ideas. But if the idea is simply without merit... I'm going to say so. And that's where people start talking about me like I'm some grumpy old bear that can't be reasoned with.

Alt Text

Knowing Your Worth

How can knowing your worth possibly be a bad thing?? Well, let me explain.

In my 20s, I already had a ton of knowledge and pretty decent programming skills. But I had a sparse resume - and it was more-than-difficult to initially get my foot in that door.

When you're in that part of your career, you tend to think very carefully before quitting, or job-hopping, or getting on the bad side of one of your coworkers. But it's been a lonnnggg time since I had such worries about my resume.

I'm blessed to work in a field where there has always been very strong demand for my skills. And my CV is now at a level where I no longer fret over any particular entry. For the most part, these are good things. But it also means that my willingness to put up with other peoples' crap is frighteningly scant.

I recently had a contracting gig where my entire team was remote - but they wanted me to come into the office every day. So... I wasn't there for long.

I recently had a gig where several of the executives were blatant, boisterous racists. (And misogynists. And anti-Semites.) So... I wasn't there for long.

I once had a job where they made me jump through ridiculous hoops to certify the security of my code (including many audit checkboxes that would do nothing to actually secure the application). But when I showed them how I could easily hack the employee database - and anyone else outside the company could do the same - they didn't care at all. So... I wasn't there for long.

Generally speaking, this sort of hyper-mobility is an asset. I mean, who wants to be stuck in a job where some aspect of it has become onerous?? But the flip side is that it becomes very difficult to justify dealing with anyone else's crap - even for a short period of time.

Again, that's generally a good thing. But I've met other Olds like me who just can't be bothered to hunker down and build a solid history with any single company - because those companies always do something that's rude or unprofessional or just downright stupid. Follow that pattern through 3, or 4, or even more sequential employers and, before long, you have a reputation as this cranky Old who just can't "fit in".

Alt Text

The Cookie-Cutter-ing of Software

One of the most soul-sucking trends in dev over the last decade-plus has been the constant effort to reduce programming to some sort of assembly line kinda process. Although I can understand the desire to refine a complex process into a simpler one, the end result of these efforts is that the programmers often end up being treated like... assembly line workers.

Look, I get it. Software development is hard. And complex. And expensive. And time-consuming. And I also understand that organizations are constantly looking for new ways to simplify these (inherently complex) projects.

But you can't build a sizable, brand new app from scratch and expect that you can just hand a pile of all-encompassing specs to the dev team and have them crank it out like they're building a bird feeder. You see, everyone wants to chase this Holy Grail idea that they can just brainstorm over a big set of specs, hand those specs to the dev team, and voila! out comes the app they were envisioning.

I don't know how many times I've been building some component, and working my way through the specs, when I realize that the client has asked for something that's completely contradictory or nonsensical. And that's fine - as long as I can ping them and have an intelligent conversation about the issue.

But now it seems that, with increasing frequency, the stakeholders wanna just shoot me over a bunch of specs - and then they want me to go away until I have a finished product. Sometimes, they literally get annoyed if I hit them up with questions. And even if they don't mind my queries, god forbid that I ever go so far as to question(!) the design they've asked for.

Most people in my position don't just know how to write code. They know how to build better apps. They know a great deal about what works - and what causes end-user nightmares. Now, I don't have any desire to be a BA or a PM. But the idea that I should never provide any functional feedback on the design of the app itself is, well... it's just ignorant.

When I was younger, I'd offer my meager suggestions. And sometimes the client would even listen. But if they completely ignored me, I didn't much care. I just did it exactly how they'd asked for it.

But I'll admit that, at this point in my life, it's pretty damn frustrating when the client's asked for something that I know will fail or need to be changed once it goes live - but if I bring this up, in any way, the annoyance in their voice is palpable. You can almost hear them thinking, "Why won't this guy shut up and just build the app exactly as we've asked him to??"

Go through that process with enough clients and you'll find yourself wondering why you're even in this career field at all...


I could go on like this for an additional 100,000-or-so words, I'm sure. But this piece is already getting pretty long. I've decided that I'm going to spin up a new series where I actually go through some specific stories of things that I've experienced.

For now, I just wanted to lay out some of the reasons why older programmers really can have problems fitting in with "modern" dev shops. It's not because they're "stuck in their ways". It's not because they can't understand the latest technologies. Frequently, it's because their own experience is almost, in some ways, working against them.

I've noticed this often when looking at myself. I find myself wondering, "How much longer can I keep doing this?" Because some of the stupidity I deal with daily can occasionally get me very depressed.

Read the whole story
9 hours ago
Hamburg, Germany
Share this story

PHP 8.0.0 Release Announcement

1 Share

Instead of null check conditions, you can now use a chain of calls with the new nullsafe operator. When the evaluation of one element in the chain fails, the execution of the entire chain aborts and the entire chain evaluates to null.

Read the whole story
4 days ago
Hamburg, Germany
Share this story
Next Page of Stories