Hot answers tagged

13

Assimilating the job of a programmer to coding is reductive. Your goal is not to write code, but to solve a given problem—usually through code, but not only code. Once you have a set of requirements, you have to do a set of tasks in order to fulfill them. It can consist of writing code, but also doing architecture, writing deployment scripts, setting up and ...


11

In general, when it comes to conditionals, it is usually easier to read a positive clause than a negative one. So someVariable == null would be better than someVariable != null - for readability.


8

I think it depends on your coding conventions in your project. I personally let eclipse automatically add the final keyword to every variable and parameter. This way you see at the first glance if a parameter is reused. In the project at my job we do not recommend to reuse parameters, but if you just want to call e.g. .trim() or set a default in a null ...


6

Programming is a skill like any other. Among other things, that means that learning it by following the outline of sites like codeacademy is probably unrealistic for some (most) people. That isn't to say that those people can't learn, rather that those sites by nature of their design tend to imply that if you've solved problem X you're proficient and ...


6

When you are working on a code-base where you seriously consider this a good idea, it's a sign that you might be working with a horrible mess of spaghetti code. In a well-organized codebase such tags should not be necessary, because each of these functionalities you mention should be contained in a single place. Components should be encapsulated and loosely ...


4

I've used the approach you describe, and it does work. However, you have to be careful with what you use it for. You can only use it opportunistically to quickly find some of the places you need to edit. You cannot use it to find all of the places that need editing. The reason you can't do this (or, perhaps more pedantically, it is extremely difficult to ...


3

Gain control of how report data is formatted. Excel simply isn't a data format. It has it's own presentation ideas. You can make this work and it sounds like a lot has already been built help you do this. So maybe you don't want to swim against the tide at this point but you're tied to a lot of things you don't want to be tied to. Different versions of ...


2

Since the logic you want to execute is conceptually the same for every "dimension", and the only thing that varies is the array you loop over and the function you call in that loop, I'd simply use a recursive function which takes array and function arguments. I don't know C# all that well, but I assume the core of that approach would look something like this:...


2

Also some programmers said that there is a good reason to usenull first: if(null == someVariable) Using null first uses a default equality comparator. :-?


1

Ask your manager if the reports to each customer need to be different, and why? If your manager doesn't know, (or gives you some flim-flam about it's always been done this way) then ask if there are any opportunities to streamline/rationalize the business process, and thus make savings. You might need to ask the customers if they would like a standard format ...


1

It can be difficult to learn given the outset of 'I want to learn to code'. However if you can give yourself a small project, like a basic calculator, you'll then have some context to learn the aspects of the language you have chosen. Then just think of new features to add which will give you reason to explore more of the toolbox. To begin with, try and ...


1

It's hard to answer this without veering off into general philosophy. What does it mean to not be able to learn something? Is it always just a matter of there being some missing link that all your teachers have taken for granted, or are some people genuinely incapable of learning certain things? How to teach programming is a major topic of interest in ...


1

Adobe Acrobat (and other PDF software, as well) has many annotation features. The one that I would recommend is the "rubber stamp". You could have a red X and a green check mark defined as stamps, as an example. You can then plop them down on the PDF image where you want and then re-save the PDF.


1

Well, see it this way: your input scan is already a raster image (the fact those raster grafics are in embedded in PDF is mostly irrelevant), so a raster image based process is all you can expect. Utilizing OCR might be an option, but it would probably only complicate the process with no real benefit and an additional source of potential errors. If you want ...



Only top voted, non community-wiki answers of a minimum length are eligible