Stephen FoX

145 posts

Stephen FoX

Stephen FoX

@Foxman

Rhoose, Wales انضم Temmuz 2008
245 يتبع91 المتابعون
Stephen FoX أُعيد تغريده
MrBeast
MrBeast@MrBeast·
I’m gonna give 10 random people that repost this and follow me $25,000 for fun (the $250,000 my X video made) I’ll pick the winners in 72 hours
English
376K
2.5M
1.9M
284.7M
Stephen FoX
Stephen FoX@Foxman·
@housecor At first you should be writing down a list of behaviours you want your code to achieve. That limits what your API can become and that’s where TDD comes in
English
0
0
0
35
Cory House
Cory House@housecor·
Why I don’t do TDD often: TDD commits me to an API before I know what API I want. At first, I’m just iterating. Once I like the API, I add tests.
English
177
85
1.6K
318.4K
Wisen Tanasa
Wisen Tanasa@ceilfors·
TDD Made Intuitive: Spec-First Thinking Why we should embed spec in our workflow. Test-driven development (TDD) is often rejected due to its perceived unintuitiveness. Is there a way to make TDD more intuitive? I believe there is, and it requires us to think more about specification first, rather than testing first. In this essay, I’ll explain why spec-first might be more intuitive than test-first. I’ll further explore why we still don’t write a spec even though it’s an intuitively small yet impactful step, with the hope that more of us will think about this in our work. Spec first, test last I previously wrote about how unintuitive TDD might be for some. The root of the unintuitiveness of TDD comes from the word test: > The idea of test to be after the fact is simple enough for even young children to grasp. They are tested, once they have studied. They got tested for an illness, once there’s a symptom for it. They can test a dish, once it’s started cooking. Testing, always comes last, not first! Let’s consider the term “spec” instead. The terms specification, specify, and specific all stem from the Latin word “specificus”, which pertains to defining or identifying with clarity. You make something specifically clear by specifying in a specification. The idea of specifying is simple enough for young children to grasp, even when they don’t use the word spec. The recipe they follow to cook is a spec. Builders don’t start laying bricks randomly; they follow a spec. Before you are about to drive that nail to the wall, you mark the spot first (spec). Spec mostly comes first, not last. In the TDD process, one might view the first step more as defining a specification than merely setting up a test. Some of you might be creating spec files without realising why it’s called this way, i.e. foo.spec.js or foo_spec.rb. The next time you write that spec file, think about it for a moment: why is it called a spec? When you think in spec-first, a specification is the defined behaviour of the elements you’re about to create. As I have described so far in this series, the benefits of TDD hinge on the concept of laying out specifications. I believe you’ll gain the benefit even when you don’t write the spec in code. Write spec in human language if you feel that it’s easier. TDD helps you save one step by encouraging you to write the specification in code. Unfortunately, although the word spec should intuitively come first before coding, we still don’t intuitively spec first. Knowing is not enough, we tend to miss this step. Coding mindlessly Seth Godin frequently emphasises the significance of specifications in his writings. In his blog post, Creating a useful spec, he wrote: ........ .... (Finish your 6m reading / 8m listening here: read.ceilfors.com/p/tdd-made-int…)
Wisen Tanasa tweet media
English
14
22
104
25.8K
Adelin
Adelin@adelindev·
@Foxman @ceilfors @KentBeck I always recommend the first part of the book; if the reader resonates with the first pages, the technique is sold before getting to any actual examples.
English
1
0
2
433
Stephen FoX
Stephen FoX@Foxman·
@ceilfors Chapter 1 of the @KentBeck book which started it all. It seems to be skipped by most tutorials on TDD which promotes the impression that you start with no up front design and just write tests. This was never the case. Up front ‘design’ is the first step all driven by a behaviour.
English
4
9
32
16.2K
Wisen Tanasa
Wisen Tanasa@ceilfors·
@Foxman I didn't realise that TDD describes a to-do list of behaviours. Do you have any references I could look at? Thanks!
English
1
0
2
596
orangepascal🎮
orangepascal🎮@orangepascal·
Started Axiom Verge on Steam Deck, didn't finish it. Nice retro feel, just bit repetitive and unnecessarily difficult? Maybe. Not my game I guess.
GIF
English
3
0
5
659
orangepascal🎮
orangepascal🎮@orangepascal·
Trying to play more games this year, first one completed is Detroit: become human (PS4). Might do a video on these games talking about the inspiration I get for my own games 🤔
GIF
English
2
0
8
1.2K
Stephen FoX
Stephen FoX@Foxman·
@danpdc Spot on. Kent Becks book is still the GOAT
English
0
0
1
255
Dan Patrascu
Dan Patrascu@danpdc·
Unpopular opinion but... 1️⃣ If you say you're doing #TDD but never heard of Kent Beck, you're probably doing it wrong 2️⃣ If you say you're doing #DDD but never heard of Eric Evans, you're probably doing it wrong
English
6
3
23
5.7K
Stephen FoX
Stephen FoX@Foxman·
@davidsmorais @epoch_rift @vitest_dev Just read your article. Good stuff. Would say that using TDD to test a framework is kinda of an anti-pattern, should only be using TDD for code you write as have to assume the framework has its own test suite. Far less frustrating using it only on what you own
English
0
0
0
41
Marc Lore
Marc Lore@MarcLore·
I don't know if I've discovered the "secret" to entrepreneurship, but I've certainly learned plenty of lessons along the way. Had a lot of fun reminiscing with @tomfoster2 and walking through what we're building @wonder. Thanks @Inc!
Inc.@Inc

Has @MarcLore discovered the secret to entrepreneurship? This visionary, tactician, operator, disrupter, competitor, and former track star has won many ways--and always with speed. on.inc.com/9H8Dbue. The magazine will be on newsstands December 13.

English
8
6
42
0
Stephen FoX
Stephen FoX@Foxman·
@talkSPORT listening to Stuart Pearce confidence in England slowly ebb away… hahaha
English
0
0
0
0
Mario Zechner
Mario Zechner@badlogicgames·
After almost 2 months, I have charged the Steam Deck and some time tonight. Please recommend games. (Already on it: Carrion, Stray and GoW).
English
4
0
2
0
Stephen FoX
Stephen FoX@Foxman·
@unclebobmartin is there example code for the ‘GUI’ data object -> request model/event handler around anywhere?
English
1
0
0
0
Uncle Bob Martin
Uncle Bob Martin@unclebobmartin·
@Foxman The base class has no public methods. The inheritance in that case is really just a shorthand for composition.
English
1
0
0
0
Stephen FoX
Stephen FoX@Foxman·
@unclebobmartin I'm reading the refactoring chapter in #cleancraftsmanship and your example using the csv/report builder has me confused. You split a class into two where one inherits from the other, isn't this a Liskov Substitution Principle no-no?? Please enlighten.
English
1
0
0
0