Daniel Grieve

414 posts

Daniel Grieve banner
Daniel Grieve

Daniel Grieve

@dnlgrv

Programmer. Working at https://t.co/XphivUiwnS

North East, England Katılım Eylül 2019
68 Takip Edilen51 Takipçiler
Daniel Grieve
Daniel Grieve@dnlgrv·
@jeremysmithco I think your rule of thumb is good 👍 My rule of thumb along these lines is don’t cause surprises. A rails dev would expect to be able to call that without introducing other objects (or whatever is triggering the exception)
English
1
0
2
92
Jeremy Smith
Jeremy Smith@jeremysmithco·
I've never thought of this as a good rule of thumb, but it just occurred to me, and I'm wondering if it's controversial at all? For every ActiveRecord model in your Rails app, you should be able to call `.new.valid?` on it without raising any exceptions.
English
2
1
8
1.4K
Daniel Grieve
Daniel Grieve@dnlgrv·
@excid3 Ahh yes. Are they anything like ours where they lie about things? There's no way she ate a plate full of carrots and broccoli... even if they logged it on the app. I need evidence.
English
0
0
0
49
Daniel Grieve
Daniel Grieve@dnlgrv·
@jeremysmithco @strzibnyj Enter a complex enough code base and those mystery guests are likely to affect what you’re testing. Fixtures somewhat simulate the real application (users with real data). A clean DB for every test is good (quick) for testing but unrealistic.
English
1
0
1
43
Jeremy Smith
Jeremy Smith@jeremysmithco·
@strzibnyj To me, this is much preferred. I'd rather each test be self-contained, building up only the set pieces necessary, with as few "mystery guests" from outside as possible. I don't want to open 4 fixture files to trace an object graph, just to understand a single test's setup.
English
3
0
0
187
Jeremy Smith
Jeremy Smith@jeremysmithco·
The hidden cost of fixtures is the time spent trying to understand the ones you didn't create (or don't remember). Dropping into a test with extensive fixtures is like trying to make sense out of a scene from Harry Potter book 5, without the worldbuilding of the previous 4.
English
4
0
14
1.8K
Daniel Grieve
Daniel Grieve@dnlgrv·
@jeremysmithco 100% Building a good fixture set is a skill. Factories don’t help with these scenarios much either mind you (unless you happen to find the 1 test that sets up your exact scenario). Still lots of improvements to make on both sides
English
0
0
2
31
Jeremy Smith
Jeremy Smith@jeremysmithco·
@dnlgrv But I imagine it gets harder when you have a couple dozen ways you need to represent and test an order in the system, and you can't easily discover which one in the UI matches which named fixture.
English
2
0
0
89
Adam Wathan
Adam Wathan@adamwathan·
Energy to engage in tech debates online is inversely proportional to the amount of time you spend chasing your kids around trying to get them to spit out dog food. TL;DR: Have kids.
Adam Wathan tweet media
English
28
1
208
24K
Daniel Grieve
Daniel Grieve@dnlgrv·
@nateberkopec Can we add salary in there too? No need to waste everyone's time by hiding it.
English
4
0
5
303
Nate Berkopec
Nate Berkopec@nateberkopec·
We should make it illegal to start a software job posting with anything other than: Location: (US | Worldwide | OTHER_COUNTRY) (Remote | In-Office)
English
6
0
58
5.1K
Daniel Grieve
Daniel Grieve@dnlgrv·
@jeremysmithco It actually messed up a lot of things for us like analytics events being sent from controllers. Might be an “us” issue though. We had to disable it entirely
English
2
0
3
45
Jeremy Smith
Jeremy Smith@jeremysmithco·
I gotta say, I'm not a fan of Turbo Prefetch as a way of improving performance. Reminds me too much of Hugh Jackman's magic trick in The Prestige. youtube.com/watch?v=C4Rrj5…
YouTube video
YouTube
English
3
0
5
1.5K
Daniel Grieve
Daniel Grieve@dnlgrv·
I know what they mean, but the wording... I paid a *lot* of f-ing tax.
Daniel Grieve tweet media
English
0
0
0
22
Daniel Grieve
Daniel Grieve@dnlgrv·
@nateberkopec I'm in as long as that 50% cash comes in a big duffel bag with $$$ on the side.
English
3
0
16
4.4K
Nate Berkopec
Nate Berkopec@nateberkopec·
In case you’re wondering what the market for top level Rails talent is like. Email from a recruiter.
Nate Berkopec tweet media
English
29
9
376
42.6K
Daniel Grieve
Daniel Grieve@dnlgrv·
@jnunemaker Yeah, I spent way too long trying to long press on the screen while sat in my car before thinking it would be something I’d do on my phone.
English
1
0
0
16
John Nunemaker
John Nunemaker@jnunemaker·
@dnlgrv Search carplay from settings then you can tap the vehicle and rearrange.
English
2
0
1
29
John Nunemaker
John Nunemaker@jnunemaker·
I rearranged my CarPlay icons based on most used. And it feels great. The little things like this add up in life. Think “what is a paper cut I can remove?“ today.
English
4
0
5
809
Daniel Grieve
Daniel Grieve@dnlgrv·
@nateberkopec My code already barely compiles and I didn’t even use any AI - have I been living in the future this whole time?
English
1
0
2
194
Nate Berkopec
Nate Berkopec@nateberkopec·
all I can see in the future is slop code will no longer be beautiful, it will only (barely) compile
English
18
1
66
31.9K
Daniel Grieve
Daniel Grieve@dnlgrv·
How I can tell they didn't look: "Hey I looked at your website and it's got a great design" No, no it doesn't.
English
0
0
0
39
Daniel Grieve
Daniel Grieve@dnlgrv·
@ccarella Not quite the same but compare watching live/scheduled TV to on-demand. There are times for both.
English
0
0
1
12
Daniel Grieve
Daniel Grieve@dnlgrv·
Is it safe yet? Can I get back to work now please? #ruby
English
0
0
0
41
Daniel Grieve
Daniel Grieve@dnlgrv·
@_swanson that'll do it! We run a ~hourly cypress based "integration test" outside of our main app that checks the important flows for staging/production just in case we break something by accident. A bit overkill but has proved useful!
English
0
0
1
128
matt swanson 😈
matt swanson 😈@_swanson·
@dnlgrv less tricky, i just deleted something that was used on those pages but i never visit them in dev
English
1
0
1
278