Bad CSS in JS

An article, posted about 2 years ago filed in css, react, style, javascript, standards, simple, simplicity, npm, packages & coffeeandorange.

I tried to understand the argument made for styled components vs. ‘traditional’ CSS. But when reviewing these arguments I found out that they typically use bad code as proof for their point.

See e.g. the following SCSS code:

$blue = #5DBCD2;

@mixin button-styles($bg-color, $color) {
  background: $bg-color;
  color: $color;
  border: none;
  border-radius: 0.20em;
      background: darken($bg-color, 6%);
      cursor: pointer;

.button {
  @include button-styles(#ddd, black)

.button--primary {
  @include button-styles($blue, white)

To pair with a simple component along the lines of:

const Buttons = props => (
export default Buttons

The suggested alternative is:

import themeVars from "myTheme"
import styled from "styled-components"
import { darken } from "polished"

const B...

Continue reading...

“If something is too complex to understand, it must be wrong”

An article, posted more than 5 years ago filed in coding, quote, inspiration, simplicity, software & complexity.

While looking for the source of another quote (something along the lines of “If it takes you too long, you're probably doing it wrong”, which I recall having picked up in the Rails community (if you recognize it, please let me know)) I found the following bold statement. We're not talking science here, we're talking software development (actually this guy is talking Java Spring development):

> “If something is too complex to understand, it must be wrong”

from Arjen Poutsma

Some background on this quote can be found on this Xebia website.

Yep, I'm working on a project that seems to have grown way too complex for what it actually should have been.

Happy coding ;)

Continue reading...

Why I stopped using

An article, posted about 11 years ago filed in ipad, work, app, internet, mac, office,, productivity & simplicity.

As promised. There was a time when I was a true fanatic. I even helped actively promoting it by redesigning the homepage . Although I'm still a fan of opensource and open document
storage which ideally should lead to a world in which anyone can use
open software and exchange documents freely without any barriers. Still, I'm no longer typing this in opensource software. I'm typing this in Google -how evil- Docs (update may 2017: Google Docs has been replaced by Apple's notes and iAWriter / Notational Velocity, the latter being markdown based).

It's not that I'm a big fan of Google Docs, but it makes a difference that, and other Office systems for that matter, aren't able to make. Not stand alone, nor in a usable way in combination with a proper operating system:

  • Relieving me from worrying about storage
  • Boot insanely fast (…

Continue reading...

murb blog