I have been programming for over 15 years now. I consider myself a very good programmer, but I understand (like all of us) there are things that I need to work on. One of these things is code repetition when dealing with conditions. I will give a generic sample:
Like yourself Steven P I have watched it from the days of William Hartnell, It was good when we had the Darlek's and the Cybermen. Sad to see one of the longest running shows in the world die a sad death.
My problem with FF is I have to jump through hoops to get at least somewhat close to what Vivaldi gives me out of the box, with no real advantage that would make it worth my while. (But hey, apparently there's now at least experimental support for HDR in FF. I mean it's about a decade too late, but still...finally!)
Brave I was never the least interested in, never saw the point, not to mention there's been quite a bit of drama surrounding them over the years.
But I've been a faithful and very happy Opera user all the way back to 2001(ish), so once Vivaldi showed up following that awkward period of time after the key people left Opera and the company was sold, I never really looked back. And they never once made me question my choices.
I see it has more memory, more storage, a better CPU, and a stylus, as you said.
Might be a good alternative. I see some refurbished for $150-200.
I'm not scared of refurnbished, as a lot of parts in my house are refurbished/used. All are working atm.
Question
xWhiplash
Hello,
I have been programming for over 15 years now. I consider myself a very good programmer, but I understand (like all of us) there are things that I need to work on. One of these things is code repetition when dealing with conditions. I will give a generic sample:
if(condition1) { //perform some logic if(condition2) { //perform some logic if(condition3) { //Perform logic } else { //MethodA(param) } } else { //MethodA(param) } } else { //MethodA() }Now, I cannot make it easy by doing the following:
if(condition1 && condition2) { } else { }I cannot do this since I need to perform some logic if condition1 is true and before I test condition2.
Is there a way to structure if...else blocks to where if you need to call a method in each else blocks, you are not repeating yourself?
Link to comment
https://www.neowin.net/forum/topic/1226783-avoid-code-repetition-in-conditions/Share on other sites
80 answers to this question
Recommended Posts