2,752 karma · joined August 24, 2012
foo calls x(user, date) foo mock # tests pass
x changes to x(user, time)
but the tests for foo do not change, tests still pass, runtime errors.
If you have static/strong typing the compiler will pick this up – but for dynamic languages you have a problem.
No I don't really charge em – but it gets the idea across that mocks have costs that you don't always see up front.
.foo {
.bar {
color: red;
}
}
becomes .foo .bar { color: red; }
The first case modern browsers can handle, but versions of Chrome upto some in early 2023 still can't – and that includes a lot of Android installs as I experienced.Once those browser versions roll off we will be able to remove sass altogether.
Typically it takes just a few minutes to switch out the CSS.
Now, there are a few very complex screens that require more effort (a lot of data viz and variable state). Those we evaluate - maybe we will punt on the upgrade – or maybe we dig in and do it if there is nothing urgent on the books.
My CSS knowledge was still stuck in 2010, with a bit of learning since then. So after seeing some impressive modern one liners I decided to look into modern CSS and compatibility.
It took about a week to write a new, very clean and very simplified CSS style sheet to replace Bootstrap. We own it, since it is tailored for our app we don't need to use many classes (the HTML element defines the style). The sheet is about 1000 lines of CSS, 50 lines of Javascript, and supports dark/light mode.
First we replaced the navbar – a global element. Now we are replacing screen by screen with the new style sheet.
It uses modern CSS nesting – but we still run it through sass because enough customers are using Android or older versions of Chrome that don't support the nesting. Otherwise we haven't had any reported problems.
MDN is a fantastic learning resource for all of this.
https://www.nrc.gov/reactors/new-reactors/advanced/who-were-...
https://package.elm-lang.org/packages/ianmackenzie/elm-units...
Very nice to prevent conversions between incompatible units, but without the over head of lots of type variants.
https://thoughtbot.com/blog/modeling-currency-in-elm-using-p...
This could lead some huge advantages, and new obstacles.
I played with the language for about a week and found it intriguing. And it seems to approach tackling Joe Armstrong's question "Why do we need modules at all?" -> https://erlang.org/pipermail/erlang-questions/2011-May/05876...
You could be on the hook for a large tax bill since you have to write off developer expenses over 5 years – this is true whether an employee or contractor.
Hopefully it will be repealed* – but if not it is one of those things that no one would expect to exist since it is in the words of Senator Wyden "stupid."
https://www.law.cornell.edu/uscode/text/26/174
* edit It won't be repealed but a law can be created to ignored it until a future date. Once on the books, because of accounting, it is very hard to remove a tax law.
We do allow the occasional use of “send” but try to avoid it. Dynamic method definitions are strictly banned.
There is nothing wrong with using NOW(), in of itself, and it maybe the best thing to do.
But it may lead to surprising results when say you have an application that has mocked out time for a specific time, but you get db results for the current time. It introduces another clock into your system.
I have found most of the time we were using NOW() we could pass the time into the query and create a more understandable chain of code.
Reserve Time.now or its equavlent to jobs, controllers, or what not at the edge of your application.
Watch out when using NOW() in your db. Not that you shouldn’t but it might be surprising when you do.
Back in the Ruby 2 days we had tools like Zeus to preload our development application because loading was so slow (10-20 seconds). These days we just load the whole app (2 seconds)
These benchmarks show a 2x speed up. While I haven't see that, I have seen at least a 50% increase in performance for our applications.
[edit, the memory increase was small just a few percent IRC]
On one hand this simplifies a lot – days are always 24 hours for example.
But it does complicate interop outside of the market since energy is traded with DST based markets, and gas is bought using the gas day clock (also DST). The gas day starts at 10am eastern prevailing time, eg. 9am is yesterday, 10am is today.