fholm | 13 years ago | on: OOP Isn't a Fundamental Particle of Computing
fholm's comments
fholm | 13 years ago | on: Bring Back the 40-hour work week (March 2012)
There's several different averages across days, weeks and months that control how much "overtime" you're allowed to work. The max is 200 hours per year though.
It obviously varies, and not everyone follows these laws, especially in (game) development, etc. As long as you the employee agrees to working over time (often uncompensated) none is going to bat an eye. The important thing is that you have a law that will back you up incase your company is trying to force you.
fholm | 13 years ago | on: OOP Isn't a Fundamental Particle of Computing
type Color
= RGB of int * int * int
| HSV of int * int * int
| CMYK of int * int * int * int
let toHsv =
function
| HSV(h, s, v) -> HSV(h, s, v)
| RGB(r, g, b) -> ...
| CMYK(c, m, y, k) -> ...fholm | 14 years ago | on: Want good programmers? Then pay them.
> Some of the comments in this thread bother me, particularly the 30 days paid vacation a year. In Europe maybe. In the US? Good luck.
What's so wrong about 30 days of paid vacation per year? I have 30, I know some (rare though) people that have even more (40+). I work to live, not the other way around.
> Never working more than 40 hours a week nor staying late? It just smacks of entitlement. I'm not saying you need to kill yourself for the company but it really is a two-way street.
For me, as a someone from Europe (Sweden) this is among the most stupid things I've heard, is it entitlement just because I work as much as my job pays me for? The agreement you sign (usually) says 40 hours per week, 8 hours per day 5 days a week. If they want me to work more, then pay more?
And before anyone from the states try to say anything about the economy in Europe and it suffering because people don't work as much, etc. Yours is so much further down the drain we lost sight of it.
fholm | 15 years ago | on: My gripes with JavaScript
fholm | 15 years ago | on: My gripes with JavaScript
fholm | 15 years ago | on: My gripes with JavaScript
fholm | 15 years ago | on: My gripes with JavaScript
fholm | 15 years ago | on: My gripes with JavaScript
fholm | 15 years ago | on: 1Gbps fiber for $70—in America? Yup.
fholm | 15 years ago | on: Pratt Parsers: Expression Parsing Made Easy
Edit, I also have a generalized version that can take pretty much any input and any output (F#) here: https://github.com/fholm/Vaughan
1) Creates a type which is a discriminated union called Color, that can have three different values (RGB, HSV or CMYK).
2) Defines a function which converts a color of any value (RGB, HSV or CMYK) to HSV.
The argument, although implicit, from me was that even though this can be easily represented using OO, this approach is far cleaner and easier to read (once you know the syntax and concepts obviously - but that can be said for any language), and that the poster above me saying that the benefits of a "good abstraction" becomes apparent implying that this good abstraction can only be supplied by OO, which is not true.
The OO representation would either be one class called Color which always stores it values in one format (say RGB), and then have get/set:ers for manipulating it as CMYK, RGB or HSV. The other way would be an abstract base class called Color which subclasses ColorRGB, ColorHSV, ColorCMYK, etc.