Same here. The test driven development side I’m ok with, but the SOLID and pattern stuff I really struggle with. Got some really big classes knocking around, and sometimes I feel like following some of the principles feels like over engineering, but when I’ve had to come back to something I’ve forgotten about but had done “properly”’ I’m so pleased/amazed how easy it is to make a change
The real trick is knowing when to use and when to ignore design patterns.
^this - plus typechecking. just good to always have in your mind, really.
This books quite old now but it’s a really good (if a bit zany) intro to design patterns.
It uses Java in it’s examples but it’s easy to translate these to C# or whatever.
I see what you did there
Despite the fact that I’ve been working with Python for a little while I still find the idea of using whitespace to denote blocks of code pretty lol.
that front cover tho’
it is of it’s time.
Lads I’ve an interview tomorrow where I’ve said I can use SQL. Think they just use it to extract data from a relational database. What do I need to know?
IT Nerd joke!
Something specific you’re having a problem with? Will help if I can
Oooft. That’s a tough call when you’re new to OO. Let me go see what I can dig up for you.
Just had a quick skim through my ebooks and they’re all too specific/advanced rather than early.
Code Academy is good. Also good is edx as it combines video, written and interactive content. Mrs Z has been doing Harvard’s CS50 on there recently so I had a quick look; this one from Microsoft is free for a month and has a fairly long section explaining polymorphism, inheritence and the rest. Course | edX
If you get stumped by anything specific feel free to drop me a DM or post in here and I’ll do my best to try and explain
OO is great and powerful, but all the tutorials are good at very simple dummy examples usually. The hardest part is using the concepts in real life when you aren’t programming dogs.
think I got taught OO using cars and vehicles - would much prefer to have had something dog/cat based
I think at Uni they used playing cards (pre-Enums), animals and students/lecturers as the main 3 examples. We then had to build some video rental software. The last one was by far the most useful example.
I did C++ at uni but I think they only got as far as storing things as variables. only thing I remember was that I got marked down for saving the results of a calculation as a .xls file instead of .csv, when the instructions were to save as csv, open in Excel and then save as xls which seemed dumb.
on the C# course I went on years ago they did vehicles I think, and then we made a media library including a fancy asynchronous play/stop button and progress bar. didn’t actually play anything, but still.
This is really the toughest thing in programming I think. Took me ages to get it and even then there are always different ways to approach it within languages so there’s a certain amount of it that I think is pure confidence in your ability to do it.
I actually think that if you’ve studied much SQL then there are huge parallels between standard relational databases and object orientated programming, but I’m not sure how much that helps.
I spent ages trying to help a mate to understand these concepts when he ended up in a job that was totally missold to him.
Laying aside dogs cats cars whatever, the main concept of OO is the notion of being able to reuse the code you write by making it as abstract as possible. I guess this is closest to in language when you make a really good idiom or in TV shows when you have a trope because you’ve managed to make a concept that can be deployed again and again in conversation or when writing TV scripts which immediately connects with the audience. If you tried making a new phrase or idea every time you run the risk of it being less well understood. Also the best idioms are the ones that are vaguest (so can be used in the most places) but still clearest to the audience.
So likewise, if you write a piece of code that can convert a paragraph from normal English to encrypted English and you get it so it definitely works every time, you’d want to turn that into an object you could pass around to others or reuse.
At that point you need to work out what the simplest amount of variables you’d need to be able to pass into your code to give the most useful output for the most universal use. And that’s where all the tweaking and personal choices come in. (And within that code you’d look at what things get done over and over and look to reduce that code into a single method/function that is called every time, meaning that as long as that function has no errors, every time it’s called it won’t cause errors.)
Not condoning Hibernate/NHibernate but cats definitely helped me learning that
Brought the whole of the development environment down multiple times on Friday with some horror script that was seemingly trying to write back to about a million records. Might still be down now.
Also demoed something to the department boss using the worst.possible.record as an example of an otherwise solid bit of work.
Last week was such a frustrating week