Oren Eini

CEO of RavenDB

a NoSQL Open Source Document Database

Get in touch with me:

oren@ravendb.net +972 52-548-6969

Posts: 7,546
|
Comments: 51,162
Privacy Policy · Terms
filter by tags archive
time to read 1 min | 100 words

I had run into something today that I have no idea how to respond to. I was working with someone and at one point I did a WAIT A MINUTE, What Just Happened?!

He then proudly showed me how he improved his daily work flow. He has modified the VS #region template so he was able to select a piece of code, hit a few keys, and get the following:

 #region old
/*

selected code...

*/
#endregion

You can guess how the code base looks like, I assume, which this technique in place.

time to read 2 min | 391 words

I had a funny moment today at a meeting, here we were, calmly analyzing what we need to do, when the client has said the Wrong Thing. "We need to add XYZ to the search page". Me and a coworker had a simultaneous twitch at this. I felt like jumping up in slow motion and screaming "Noooooo!!!", like in a bad cop film.

The search page is undoubtedly the most complex piece of the application. Just the UI portion of the result grid alone was took about two days to build. A quick calculation showed that we have ~15 classes that take parts in building this page, it is interacting with at least three other pages that I can recall off hand and can do anything from producing reports to making coffee. To be clear, the ~15 classes that I am talking about, they are not domain classes or infrastructure stuff, those are classes that exists solely for this page. It is not a page, it is a module, but all of its functionality is exposed

Then I took a deep breath and remembered that I actually have (lots of) tests in place for this, that I am actually capable of running them and that the code is good code. 

I still don't want to touch that page, the last time that we did, we broke this:

  • Search something
  • Move to the third page
  • Order by date descending
  • Click on second result and go to details page
  • Click on another link in the details page
  • From the second link, go back to the search page (verify that you are still in 3rd page, ordered by date descending)
  • Click on second result and go to details page
  • Click on another link in the details page
  • Boom!

I can do any sort of change there, and objectively, there isn't anything there that cannot be safely changed, I can assert that my change didn't break existing functionality (except stuff like above, which we didn't have a test for). Nevertheless, I would like to leave that alone. It is perfect as it is right now, both from UI perspective and from code perspective.

I am afraid of another tree view incident, frankly*.

I wish we could apply SRP to UI.

* Seemingly simple change, with cascading complexity as you start to understand what is required.

FUTURE POSTS

  1. Partial writes, IO_Uring and safety - about one day from now
  2. Configuration values & Escape hatches - 4 days from now
  3. What happens when a sparse file allocation fails? - 6 days from now
  4. NTFS has an emergency stash of disk space - 8 days from now
  5. Challenge: Giving file system developer ulcer - 11 days from now

And 4 more posts are pending...

There are posts all the way to Feb 17, 2025

RECENT SERIES

  1. Challenge (77):
    20 Jan 2025 - What does this code do?
  2. Answer (13):
    22 Jan 2025 - What does this code do?
  3. Production post-mortem (2):
    17 Jan 2025 - Inspecting ourselves to death
  4. Performance discovery (2):
    10 Jan 2025 - IOPS vs. IOPS
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats
}