DEV Community

loading...
Ben Sinclair profile picture

Ben Sinclair

I've been a professional C, Perl, PHP and Python developer. I'm an ex-sysadmin. Back in the day, I had a geekcode which I'm not going to share with you. 418 I'm a teapot.

Location Scotland Joined Joined on  Personal website https://moopet.net github website twitter website

Education

Something something cybernetics

Last 250 comments

Should I use ternary or the logical and operator?

I'm a fan of making things as easy to read as possible. In a...

Easy Tailwind CSS Trick to Create Responsive Websites in 1 Minute

img { max-width: 100%; } Enter fullscreen mode ...

Censorship on DEV Community 😶🤐

No, no I'm not assuming you mean the same thing! I'm saying ...

Censorship on DEV Community 😶🤐

It's what's generally meant when people complain about free s...

Do I need to do private side projects to be/become a professional web developer?

Do you need to? Absolutely not. In fact, I think people put ...

OhSnap! Handy Terminal & Git Commands

Gotcha. If you're using Vim to edit git commit messages and ...

Censorship on DEV Community 😶🤐

Gotcha.

Censorship on DEV Community 😶🤐

despite the possibly misleading title of my post [...] I t...

Censorship on DEV Community 😶🤐

I have only been notified of one comment of mine being delete...

Censorship on DEV Community 😶🤐

I'd be very much against displaying any sort of stats like th...

Censorship on DEV Community 😶🤐

I have no idea what post "we" might be talking about here, fo...

Censorship on DEV Community 😶🤐

When you say you've seen this happen more recently, do you me...

TailwindCSS: Adds complexity, does nothing.

And it is on the author to cover both sides I don't think ...

TailwindCSS: Adds complexity, does nothing.

I don't think making money is a useful metric for anything el...

OhSnap! Handy Terminal & Git Commands

Couple of tips: cmd + k is going to be specific to MacOS. ct...

TailwindCSS: Adds complexity, does nothing.

I'm not sure I follow. I'm saying that having the same featur...

Why Tailwind? A long term user perspective

Bloating the HTML by eliminating the separation of concerns ...

TailwindCSS: Adds complexity, does nothing.

Ever use a modifier class to change how your component appea...

TailwindCSS: Adds complexity, does nothing.

You can do that in things like Sass, too. It's not a benefit ...

20 JavaScript One-Liners That Will Help You Code Like a Pro

09 Toggle boolean const toggleBool = (bool) => (bool ...

HTML mark up for italic text

This is very interesting. I've never taken a step back to thi...

Do you use subdomains?

Yes, yes I do. An example is the.littlest.website which, to ...

15 reasons why you should be using Figma for design

It is Free Kinda. It has a freeware tier, but it's prop...

A Rose by any Other Name

toggle CHANGES the name of the class ("firstColor") to anoth...

Have you ever seen foldable login form ?

I can appreciate the effort that went into this, but why woul...

Brave - The Browser that pays Crypto

Either an ad is displayed when you open a new tab. Which you...

8 Linux Commands Everyone Should Know

I wrote an entire post about that once :)

How I Use Vim to Code (Productivity Tips)

I'm a big fan of Vim and someone who doesn't "get" why Sublim...

Is 0kb of JavaScript in your Future?

the ability to server render a page and then have forms func...

An Enhanced Shell With ZSH

Most of the things people claim you can do with zsh are scrip...

Undo your last git mistake with ugit

Yo bhupesh, I can just you know alias this command. That ...

✔||🤢 Commit or Vomit | function currying 🍛

I don't really like currying, but that might be because I've ...

8 flags showing it's time to quit my job as a developer

Leaving a company simply isn't an option for a lot of people.

Rejected by Facebook

Mm, "I am not able to" can mean that they usually do if they ...

How I exploited NPM downloads... and why you shouldn't trust them

That's not what the post is getting at (to my reading). The e...

~/.dotfiles

This is a very nice write-up.

Supercharging Vim: Navigate files instantly

I use fzf, these days. I always found CtrlP was reeeeeeaaaaaa...

Using the glassmorphism UI trend in your web project

You should be careful using this sort of technique that the t...

How to get 4000+ followers on Spotify

Why do you want your playlists to have lots of followers? Is ...

Tricks of declaring dynamic variables in Bash

Given the format you've chosen for storing variables is the s...

Different Markdown Editors, And Why I Use Ulysses

I might be in the minority here but I like reading markdown a...

Tes

Succes

Say something from the terminal

The most amusing thing about say is that if you ssh into a ma...

Would you use a webapp to search linux commands

Commands with long paths don't matter. You make sure they're ...

Would you use a webapp to search linux commands

man -k or apropros help with that. But fundamentally, if you...

Would you use a webapp to search linux commands

How do you remember the options and flags supported by a spe...

Question: How many of you google basic things for your language after several years of experience?

I'm (mostly) a PHP developer these days. I've been doing it o...

Page scroll progress bars

Gotcha :)

Page scroll progress bars

The home page here breaks browser functionality, but it's not...

Page scroll progress bars

But what if the site didn't hide the native scroll bar? Would...

Page scroll progress bars

Infinite scroll breaks browser scrollbar functionality, and t...

Page scroll progress bars

That sounds like a web browser but with extra steps :)

Page scroll progress bars

Unless you have an unusually large footer, why would the two ...

Page scroll progress bars

So there's some kind of a progress bar that tells you how mu...

DISCUSS: JavaScript just DIED! What language should replace it?

PHP is a dinosaur in the tech space! Does that matter? The...

DISCUSS: JavaScript just DIED! What language should replace it?

At the moment, based on the agency I currently work for, I'd ...

Are we all going to have tabs for smartphones?

We all agree our smartphones are at the center of our daily ...

Put Down the Destructuring Hammer

This isn't a straw man - the title of the post is "put down t...

DEV.TO writers, what MD tools do you use?

Vim. Sorry not sorry. The whole point of Markdown is that y...

ZSH cheatsheet for git plugin

You're talking about plugins for oh-my-zsh, right, not for zs...

TailwindCSS: Adds complexity, does nothing.

I agree with all of this, and have been mulling over making a...

Command-Line Interfaces: Structure & Syntax

This is really cool. I don't think I've ever thought about ex...

Why “dark mode” is more energy-efficient: How to calculate image energy-cost

That research is a decade old now - transfer costs have presu...

Why “dark mode” is more energy-efficient: How to calculate image energy-cost

Aren't OLED screens in the tiny minority, though, overall?

Creating an SSH connection to a server

Top tip: pbcopy is a MacOS-specific. On systems with X, you c...

TOP 30 Mac Useful Tools

I'll second the recommendation for Amphetamine. I use it to s...

🔨 [git]: Write better commits with Gitmoji

I think this is a lot harder to read than text, and a lot har...

Are you using these Code Editors?

You already said that, in the post and the video, and I think...

Towards a better message of the day

Wait what I wrote this forever ago and didn't even notice I w...

Why I moved from Styled Components to (S)CSS modules

I mean it in "why not go back to regular CSS" terms. Unfort...

Why I moved from Styled Components to (S)CSS modules

It also cost readability. It's ok if you end up writing simpl...

YouTua - Download any Videos Instantly...

If you're happy with command-line tools, youtube-dl does this...

Current time tag

I'm not sure what you're asking?

Still Using HTML? Start Using React Components

But when you use React components, you're still using HTML...

What password manager should developers use ?

It's not really greedy when it's a service and product they'r...

What password manager should developers use ?

More importantly, and something I forgot to mention, is that ...

Show off the swag you got (̿▀̿‿ ̿▀̿ ̿)

We can all agree on one thing that swags are awesome. Allo...

MegExp?

Are you saying this is something that exists, and you want op...

Are Code Editor Extensions Hurting Young Devs?

I would say it's something that affects developers early in t...

A simple strategy for structuring TailwindCSS classnames

I[f] you want to take it even further, you could outsource y...

Warning: Elaborate Scams Abound!

Always hang up and call the official support number. This....

Easily Manage Dot Files (Config Files)

Why do you use sudo for every copy command? The implication i...

Migrating from Lastpass to Bitwarden. I'm changing password manager 🙅

I moved to Bitwarden after someone mentioned it on a post her...

Can’t work or code continuously because of slow laptop or PC? Try these steps

the limitation of going outside There's a much greater ava...

MVC Tutorials Are Broken

In particular, they had a 3,000 line “method” for their sear...

Bringing Modern OO To Perl

I looked at some Perl I wrote the other day, from about 15 ye...

A Tiny Note About Interfaces

Exposing the scaffolding is making an implicit promise that ...

Dreams about coding solutions?

I sometimes dream solutions. Sometimes they even work. Someti...

PHP 8 Is here! A step in the right direction?

I think in many ways PHP is a lost cause. It simply has too m...

Why start using TailwindCss in 2021

That's not how people use it; people do it the Bad Way in the...

Why start using TailwindCss in 2021

Why bother learning this new way of writing CSS? It's an o...

Writing better conditional expressions in JavaScript

Sometimes it does, sometimes it doesn't; I don't think you ca...

Ever thought of random numbers in CSS?

Can you think of an example of when it would be useful?

How do you like my resume?

I think it looks like a young person's work. No offense! What...

How do you like my resume?

Why not? Ideally, any page you read in a browser should work ...

How do you like my resume?

Every website I make will fit in any device from a large com...

Lensflare - The next Unsplash. Please offer some feedback on it!

Looks good! Found a few issues: Scrolling is broken for me ...

Go Update Your GitHub.... NOW!!

What if you choose to use something other than Github? Are yo...

Best Way to take Backup of Gmail Emails

Or you can choose to download your email directly from the Gm...

Coding is Boring! why do you love coding?

It's a bit like a game. Like Minecraft, for example. You can...

HERN Stack, Comin’ In Hot

I don't even know how I would begin to pronounce HFRN Gett...

You Had Me At Node.js

... unique advantage because millions of frontend developers...

What password manager should developers use ?

They are though. They exist because people are prepared to pa...

What password manager should developers use ?

Ok, without getting too reductionist, I don't particularly un...

What password manager should developers use ?

A computer is a hardware solution.

What password manager should developers use ?

1password started as Mac-only so when I used the 1password in...

How I cleared Naggaro IQ test [50Qs -12mins -18 reqd' to clear]

I don't think that's how statistics works. Assuming the distr...

How much money have you made with DEV posts?

28 Free Udemy Courses: Python and More

All your links look like they go through LinkSynergy which is...

What password manager should developers use ?

When you join a company you probably have to use whatever the...

HOW TO MAKE A SIMPLE BLACKJACK GAME IN PYTHON.

Hi! You may want to change your post title, because at the m...

What’s a website site if nobody can discover it?

What if you own your Mercedes Benz because you... like it?

Refactoring IF, a real exercise

Refactoring isn't about improving performance. I suspect that...

Writing better conditional expressions in JavaScript

I find short circuits, destructuring and arrow functions seri...

✔||🤢 Commit or Vomit | Easter eggs

Whether I would or wouldn't depends entirely on the product a...

Why do you still use Sublime?

That's not a point in favour of ST though unless what you're ...

Vim Thinking

I'm pretty sure people would cut and paste (or retype) the 0 ...

Light mode or dark mode: Which do you prefer and why? 🤔

I think that we've had themes for decades, and things like f....

Why do you still use Sublime?

I just started VSCode on my Windows gaming machine (while wri...

Why do you still use Sublime?

What about WinAmp?

Why do you still use Sublime?

Most editors support plugins, don't they? I know Vim will let...

Why do you still use Sublime?

It is smaller, faster Than what? Other editors in general ...

Light mode or dark mode: Which do you prefer and why? 🤔

I prefer people to write their software to respect the user's...

If (all) else is complicated, switch to switch?

Generally I think people are trying to move away from functio...

If (all) else is complicated, switch to switch?

Because anyone who isn't used to seeing it will think it's a ...

How I cleared Naggaro IQ test [50Qs -12mins -18 reqd' to clear]

if you keep only One choice of option probability of getting...

Static Site Generators - the WordPress alternative no one's talking about

A static site generator is literally a site like wordpress bu...

Surfing web inside a terminal, because why not?

I got through about half this post thinking, "why not just us...

Integrating Tinkerwell with GNOME

What problem does this solve? PHP already has a REPL, and mos...

Is JQuery still worth learning in 2021?

It doesn't matter so much that there's a lot out there. It's ...

How to access localhost from the Internet?

They're all free unless you want to do "advanced" things with...

Quick Test Your Bash Shell

If you run it via bash or make it executable and run it, it'l...

New laptop, new OS. My adventure going Linux starts here.

Apple lets you pick whatever keyboard layout you want It d...

An Algorithm to Swap Two Variables Synchronously, Without Creating a Temporary Variable

I can't imagine this being useful even at an enormous scale u...

How I Made This Realistic Red Switch (Pure CSS)

Nobody says that though, they say "Pure CSS". It's kind of a ...

Your website does not need cookies

Also, I got 52 seconds on that game, which is a totally cool ...

Your website does not need cookies

Getting clients on board is next to impossible. They want th...

How I Made This Realistic Red Switch (Pure CSS)

I know what you're getting at. But pure CSS to me means using...

How I Made This Realistic Red Switch (Pure CSS)

It needs a bunch of HTML to back it up? There are several DIV...

Introduction To The Command-Line Interface

Your "tidy up" section implies you're missing a step. You cre...

How I Made This Realistic Red Switch (Pure CSS)

This looks really nice (though it's not "pure CSS"). If I co...

How I Made an Inaccessible Site Accessible for Myself with UserCSS

I've used a few community style extensions. I find they're of...

What if LinkedIn was beautiful? - New UI

I think the existing LinkedIn interface looks kinda nasty, to...

Wondering about browser cookies? this post for you!

Actually, we deal with browser cookies (sometimes without kn...

What Does a Personal Injury Lawyer Do?

From what I've been able to tell so far, what a personal inju...

Why your website should work without JavaScript.

Re your accessibility point, Some people find it easier to...

Organise your forms with fieldset

You know, it never occurred to me that you could disable enti...

Getting started with GPG(GnuPG)

How did you get your code blocks to have the little "full scr...

Regex - underrated or overHATED? Part 1/ 3

That first, "random" example you gave is a poor one because i...

Should Developers Join Clubhouse?

Clubhouse has been all the rage lately online I've never h...

How to get current date time in vue js

Wouldn't this be... new Date() ?

Emoji😊🤣 In Python

So Why not start using emoji in our python program Oh go o...

So, how many of you respect CSS as a programming language?

I'm not sure what you're getting at. You've very deliberatel...

Cool json git diff command

That's clever.

Do you use Linux? Answer for the chance to appear on the DevDiscuss podcast!

I use Linux, on my personal laptop, on my gaming PC under WSL...

Zsh Tricks to Blow your Mind

I use zsh these days because it comes on my work Macbook, and...

Don't fear the command line : Tar. What is that?

The f needs to be the last flag in a group because it require...

How to use fancy font anywhere

What do you mean by "it works on searching"? On this page, i...

How to use fancy font anywhere

How does this work with plain text, searching, or screen read...

Web Development on a 13″ MacBook Pro M1

Yeah, I use mine with external everything too :)

Web Development on a 13″ MacBook Pro M1

The giant touchpad on my 2020 model does the thing where when...

Write good PHP - Lookup-arrays

You've made the switch version look more verbose by changing ...

Write good PHP - Lookup-arrays

I'd never heard of it. It looks better than switch for most t...

Accessibility Audits

These tools are a good place to start, but you need to get re...

test2

Dasfasda.

5 Tips for effective meetings

6: use a cat face filter.

URL PROBLEM SOLVED-Android to Window

If you've opened the link in a browser, then that browser sho...

Ways to write BAD CSS

I think making z-indexes multiples of 10 or 100 is a sound id...

[IN PROGRESS] Simple phishing and Remote Code Execution Proof of Concept

This is one of the simpler ones What is? You seem to have ...

RedBull OS Build 11 Download.

My first suggestion is to show your work - host it somewhere ...

So, you want to open two files in vim?

You can also use -O for vertical splits, and if you omit eith...

8 Reasons Why Every

As a developer, you need to ensure the app/website you have ...

Answer: PHP preg_match for validating 10 digit mobile number

I don't think that's a particularly good answer, or something...

Bash random password generator

Looks like I'm mixed up. ">>|" will force it on zsh. Y...

Bash random password generator

# Check if the log file is present and if not, create it if ...

What is the name of this font ? [images]

It looks like "Operator" - see whatfontis

DEV not loading correct theme?

Yeah, I get similar problems. I also see notification indicat...

You need to try this NPM Package

"You need to try this NPM Package" The title might sound cl...

Breaking the law with <fieldset>

I think bootstrap (and similar) are made by people who have a...

What's your favorite hacking scene in a movie?

Probably any scene from Sneakers or War Games. Or that one mo...

Breaking the law with <fieldset>

As long as the fieldsets make sense and you're not putting "f...

An engineer's plea to designers

You know that joke about the QA engineer who walks into a bar...

If you've tried Linux and opted against using it, tell us why for the chance to be featured on our podcast!

If you installed Linux on a Macbook Pro would multitouch wor...

If you've tried Linux and opted against using it, tell us why for the chance to be featured on our podcast!

Maybe. I don't remember seeing that, but if it's the case, th...

If you've tried Linux and opted against using it, tell us why for the chance to be featured on our podcast!

On a Mac and a Debian box right now, and I can read other peo...

If you've tried Linux and opted against using it, tell us why for the chance to be featured on our podcast!

Yes, it has a prompt that reads Password: instead of [sudo] p...

If you've tried Linux and opted against using it, tell us why for the chance to be featured on our podcast!

How would your example script be any different on MacOS vs Li...

If you've tried Linux and opted against using it, tell us why for the chance to be featured on our podcast!

Not trying to step on the toes of the podcast, but your first...

3 Best Programming Repositories

Your post title is "3 Best Programming Repositories" but you ...

YouTua - Download Videos in the best Quality available..

I think either missing out the bit about copyright (which you...

Va Va Vim: Get Going With the Vim Text Editor

I'm pretty sure that image with the arrows has the arrows the...

How to Customize the Nano Text Editor in Linux

I think this would be better with a new tag, #nano, rather th...

YouTua - Download Videos in the best Quality available..

You can claim whatever you like about copyright, but YouTube'...

💬 - What's the COOLEST Vim plugin?

I disagree - NERDTree is missing the point of Vim. The Vim wo...

Placeholder title

I'm curious, because I see a lot of these posts called "Place...

Automate file renaming with Node.js scripts

I'm not a node person - why would you need to regularly renam...

Have you ever considered to be a YouTuber?

Wait, do you have to have a certain number of subscribers bef...

Have you ever considered to be a YouTuber?

I don't follow particular developers on YouTube, however I do...

Why Tailwind Isn't for Me

I see almost all the same points applying to bootstrap.

Why Tailwind Isn't for Me

Agree. Reason 1 and 2 get quoted to me when I try to argue m...

Pure CSS | Contact Form Dialog | Concept Design

I tried forking that codepen thing but after 15 minutes I sti...

Pure CSS | Contact Form Dialog | Concept Design

I like when people try to do this, but I feel the need to poi...

What's the best Linux distro for Windows users?

If you want to use it as WSL, I'd say Ubuntu. It's not my fav...

6 Commands to Clear Linux Terminal

ctrl-l is bound to the same sequence as printf "\033c" I beli...

What's your favorite URL shortener?

Yeah, that's what I mean by it adding a point of failure :)

What's your favorite URL shortener?

I don't like them, in general. In my own software I try to a...

File Ownership and Permissions in Linux

You mention that links can be hard or soft (symlinks) but I t...

Is linux better than windows for development?

If you already have Windows, you'll have access to WSL which ...

My Favorite Bash Tips, Tricks, and Shortcuts

You have these stored in .bash_aliases (which is conventional...

A small byte of bash aliases and functions.

For your process finding one, you might want to exclude the g...

What screen resolution do you have?

Well I have the two laptops set up so I can control them with...

5 Web Dev Myths That Will Change In 2021

I haven't heard anyone say #1 for about 8 years, and I've nev...

What screen resolution do you have?

On my main PC I have two monitors, one 22" @ 1920x1080 and on...

Improve workflow efficiency by using your keyboard smarter (Linux)

If you don't use caps lock, why did you bother making a mappi...

My 2020 in books

Some of those sound really interesting, especially Educated a...

How to automount disk drive

I am a master hacker! I know eveerything!

5 JavaScript "tips" that might bite you back.

If you're in the sort of situation where that optimisation is...

How to automount disk drive

This depends on the system, but the easiest thing is going to...

kjl.

Have you copy pasted in github.com/react-icons/react-icons ? ...

Automatically Open the Current Directory in VS Code From Terminal

Have you tried it without? What OS are you using?

Automatically Open the Current Directory in VS Code From Terminal

I'm pretty sure VS Code installs itself into the path anyway,...

(More) Feedback for HotTea.

You can add a "series" option to your post's front matter if ...

5 JavaScript "tips" that might bite you back.

Do people really do things like exploit bitwise operators as ...

(More) Feedback for HotTea.

My suggestion would be to add something - anything - that say...

5 Reasons Why Dark Mode Matters

I think that's the bit I'm getting at - "dark mode" isn't uni...

5 Reasons Why Dark Mode Matters

It provides the opportunity to present a unique user interfa...

Installing Microsoft Fonts on Linux(Comprehensive Guide)

I think it's odd that a source calling itself, "it's FOSS" wo...

How to watch a directory in Java?

I think there's an inotify library for Java. That would take ...

What web analytics tools do you use?

I've used Piwik before (when it was called Piwik). It was alr...

What's your attitude towards hype?

It may be confirmation bias, but I think that a lot of the th...

test post

✅ test passed successfully.

PHP capitalize first letter of each word

If you're using PHP to generate HTML documents, I'd massively...

Let's play "never have I ever" developer edition.

I think all my PHP is written in anger.

See how much you coded in the past year with git!

As with most node packages, this crashes for me before it eve...

Magnificent Ballet of Interview Failure

That's a perfectly acceptable answer. Especially from a progr...

Want review on the summary section in my resume.

To work in an organisation as Front-End Developer I have mor...

Ten Tips for How YOU Can Make Your Workplace Friendlier for Women

A lot of free software uses "she" and "her" in its examples. ...

13 Dreadful Website Redesign Mistakes To Avoid In 2021

Have a look at the following image, which demonstrates the m...

What tech did you use to build your personal website/portfolio? 2020 Edition!

I don't have a portfolio, but the tech I used to build moopet...

Wallpaper Challenge!

There's no challenge in the post, though, it's just sharing w...

Basics and Variables

It doesn't have any concept of shadowing. If you have a glob...

Should I use Linux?

Different people have different workflows. I don't like these...

Wallpaper Challenge!

What's the challenge?

how to change the whole page scale (zoom) ?

Would it be better to adjust the size of everything in CSS? ...

loading...