June 2, 20206 yr How do you judge the efficiency of your code? Does it matter as long as it works and doesn't create a huge overhead? The thing I have always loved about "development" since tweaking magazine listings on a ZX Spectrum is creating a problem and then solving it, and that's how I've learnt. But because I'm really a designer and never trained in development I feel I don't know enough. I wonder if I create solutions which are more complicated than they need to be and make life difficult for myself. But that puts me in a kind of Catch-22 because I won't know there's an alternative until I've found an alternative, so I'd have to go over code again and again which is boring but which is also a waste of time, especially if my solution was actually pretty good in the first place. Any thoughts? TIA Paul
June 2, 20206 yr The code that is the most optimised isn't necessarily the best. It depends on what the code is for. If there's a large number of people going to be working with that code and iterating on it then it's arguable that readability is more important than speed optimisation. Maybe it's designed to be re-used in different ways, or it's for a very specific job. You need to figure out all the intentions before you decide what to place importance on. Writing good software is all about making the right trade offs to suit your purpose, as such there's no such thing as "perfect code". One things certain though - good code will have automation tests around it that prove it works without testing the implementation details and the tests themselves should be readable. Edited June 2, 20206 yr by rbrtsmith
June 3, 20206 yr Author Thanks. Certainly automated tests and formal analysis is important in commercial development - though from my experience not always rigorously implemented or universally popular 🙂 I also know that even professional developers often come up with alternative solutions they prefer, at second or third consideration but they also come up with solutions which I would never even consider because I am simply not aware of the options and/or syntax shortcuts. I guess I'm wondering if only formal courses can give you that deeper insight or whether experience is just as productive?
June 4, 20206 yr In my opinion a combination of courses and practical experience will help but in my experience by far the biggest influence has been working with extremely talented engineers. I'd say testing is popular, just not in the agency world. Every business I've worked for/with have extensive automated tests bar my first role at a web agency. The problem is many engineers don't know how to write good tests. To the point were myself and a few friends co-own a business that helps companies that train engineers to teach the art of writing good tests. I suppose like your question at the start of this thread, you can write bad solutions to a problem, you can also write bad tests. Both are costly and to be an effective engineer you should be good at both. So anyway my advice would be courses teaching fundamentals (frontend masters is a good shout) and try and get a job in the industry, even agency work will be a level up from the kind of stuff you'd build as a hobby, then after a number of years you may be ready for the next jump to a larger org who do write tests etc. e.g. The BBC or Sky. I should add that I'm only speaking for the majority of agencies, I'm sure some of the better ones do have some level of automated tests. Edited June 4, 20206 yr by rbrtsmith
Create an account or sign in to comment