I f you need to comment your blocks try this:
Conclusion:
It would be nice to have a special Comment
block but this way it works for me too.
Programmer in Canada
I f you need to comment your blocks try this:
It would be nice to have a special Comment
block but this way it works for me too.
Sometimes we have an object which requires a Web server response to work properly. How are we gonna unit test it? Do we need an actual Web server returning all the responses we want for testing? Apparently we don’t because in .NET we can associate our requests with particular responses using WebRequest.RegisterPrefix
Continue reading “Unit Testing .NET Code That Requires Web Server Responses”Recently I was watching a very nice explanation of LSP on Christopher Okhravi’s YouTube channel. After approximately five minutes of watching this video I wanted to know one thing: how can I actually break it?
Because, you know, breaking things when you learn gives you better understanding of how they work. Am I right?
Continue reading “Breaking Bad: Liskov’s Substitution Principle (LSP) violation”I saw many programmers creating tutorials for other programmers using these short and funny names for functions, classes, methods etc. I would consider it as a bad practice in general.
Let me explain why.
Continue reading “FooBar or FizzBuzz Discombobulation”Encouraged by Dmitry aka Senior Software Vlogger recently I read an interesting paper called “Out of the Tar Pit” by Ben Moseley and Peter Marks. Good 50% of the article is way over my head.
According to the paper the two most important ways of how complexity comes to our apps are State and Control. Control is order in which things happen inside app. State is variables that change what and in which order program does. Both of them make an app hard to understand hence to modify.
The less State and Control a computer program has the better. The simplest program “Hello world!” does not have State and has only one thing to do (console output of a hard-coded string).
That’s all right but the authors say that OOP (which I like a lot) does not help fighting complexity. And this conclusion surprised me because… it really does! I wanted to check the authors conclusion by practice.
Continue reading “Fighting Complexity of a Simple Calculator App”Recently I watched a TED talk about AI spying on us. Apparently governments and big corporations collect a lot personal statistics.
That’s true. My cell phone’s GPS module lets them know were I go. Free emails app gives away my contacts etc.
What can I do about this? Probably not so much. I’m not gonna use Tor until it become as comfortable in use as Chrome. Or paper maps? LOL
No. I’m not gonna worry about businesses and politics keen to know what music I prefer.
Just one thing is really annoying for me: stupid AI struggling to choose “right” adds for me when I watch YouTube.
I was told that it’s a quite complicated task. I absolutely disagree. Let me show how I would solve this problem.
Simple! Google, please, feel free to use it.
Would you like write your own code choosing adds for you?