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:
It depends on how technical of an answer you want. Does it stop manufacture drivers? Yes, the universal driver is the only thing that interfaces with the printer hardware. However, print support apps (PSAs) are the new way to provide that functionality you speak of, and they integrate directly into the print dialog box, so the user doesn't see any difference at all.
This is nothing new...this has been the preferred way to do print drivers for almost 8 years! The only thing changing here is that the older printer model drivers of the past are being deprecated.
I highly suspect that you yourself have installed a print support app described as a driver package from the manufacture's support page, had it work exactly as expected, without realizing it was using the universal IPP driver under the covers.
For example, USB keyboards have all used the generic HID driver for just about as long as they have existed, but that doesn't stop manufacture "drivers" from enabling more features.
its slower than ever. especially on mobile ios. really poor app. Slack is a million times better. shame the company i work for moved from Slack to teams few years back. was like moving from 2026 to windows ME.
Manufacturers will be able to ship printer-specific functions through their support apps (their companion software, in other words). But no, drivers won't be needed from them anymore, only the universal one included with Windows.
Think about this as printers all agreeing to a stardandized API for common functions, all talking the same language and supporting the most common functionality via that API, so only a single driver is needed to talk to them. Any additional functionality not handled by that driver will be provided by the companion software for the printer.
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