Reactotype Part 1
part one because I've got a feeling this is a topic about which I'll be able to bang on.
React JS was made by Facebook to be the V in MVC. In other words, it only deals with the UI. It's sold as being fast - both for performance and development. A contentious part of React is that it mushes JS and HTML together… More specifically, you put HTML inside the JS and not vice versa.
Fun With Structs
We had a brief conversation at work the other day about extending a type to make our code clearer…
public class MeaningfulName : MathsName
{
public MeaningfulName(double w, double x, double y, double z) : base(w, x, y, z)
{
}
}
Happy Numbers
I love C# but while we're trying to beat our deployment process into submission at work I'm only really writing Ruby and Powershell. So when a few, different articles about the Happy Numbers kata turned up on my twitter feed and I found myself with a large whisky and a sleeping family I thought I'd have a go.
The Happy Numbers kata is defined as
Choose a two-digit number (eg. 23), square each digit and add them together. Keep repeating this until you reach 1 or the cycle carries on in a continuous loop.
If you reach 1 then the number you started with is a “happy number”.
Can you find all the happy numbers between 1 and 100?
Transforming web.config values with Rake
I've really been enjoying using Albacore Rake instead of MSBuild at work. It's enabled us to get everyone involved (because ugh, msbuild xml) and to improve our CI/CD pipeline.
Today we were talking about reducing the number of build configurations we have… which we only have in order to support config transforms.
Static Factory Methods FTW
It is relatively common to find (or write) a line of code like this
var thingy = new Thingy(_someDependency, false);
Reading this line a person can know this is initialising a Thingy
which takes a dependency on something… and something else is false.
I'm really lazy and easily distracted so I don't like to have to think about anything except the one task I'm trying to not get distracted from. Having to think about what it means that something is false provides an opportunity for me to get distracted.
Websites != CMS Platform - Wrapping Up
This post is part of a series where I'm hoping to prove to myself that building a dynamic website with NodeJS is much more fun than using a CMS platform. See the first post for an explanation of why
The code can be found on GitHub
Previous Post I've been banging this drum into the internet's echo chamber for five months now and enough is enough!
Websites != CMS Platform - Better Editable Affordance with JS for great good
This post is part of a series where I'm hoping to prove to myself that building a dynamic website with NodeJS is much more fun than using a CMS platform. See the first post for an explanation of why
The code can be found on GitHub
In the last post a better visual affordance that a page element is editable was added. But didn't solve the problem that notifications of success or failure were obtrusive and disconnected from the edited element.
Websites != CMS Platform - Better Editable Affordance
This post is part of a series where I'm hoping to prove to myself that building a dynamic website with NodeJS is much more fun than using a CMS platform. See the first post for an explanation of why
The code can be found on GitHub
In the last post I wasn't happy with the visual affordance that a page element is editable.
Websites != CMS Platform - On Page Editing
This post is part of a series where I'm hoping to prove to myself that building a dynamic website with NodeJS is much more fun than using a CMS platform. See the first post for an explanation of why
The code can be found on GitHub
A.K.A. No More CMS-y Admin Section?
A traditional CMS framework or website has an admin section for logged in users. That section has a menu showing them which sections the user can edit and each section has a list of the pages they can edit and then the user can edit the text or upload images using a WYSIWYG editor.
Don't fix it if it aint broken but… but… HTML5 includes the contenteditable
attribute which makes (the text of) almost any element editable.
If the admin section exists (in large part) to allow editing of content and editing of content can be completed in the page itself could this replace the admin section?
Websites != CMS Platform - Promises - part 2
This post is part of a series where I'm hoping to prove to myself that building a dynamic website with NodeJS is much more fun than using a CMS platform. See the first post for an explanation of why
The code can be found on GitHub
So, in the last post I worked on switching some callback code to using promises with Bluebird library but as I've not seen much promisified (definitely a word!) code I wasn't sure whether it was any good.
So I posted a question on the code review stackexchange asking for feedback.