Hot answers tagged

34

With correctly written and complete requirements, there is no such a thing as a distinction between bugs and poor performance. Because you specify the performance as a non-functional requirement, poor performance becomes a bug just like any other bug, and will be caught by QA and solved by developers before release. Is there a social problem? I don't think ...


28

It's just to try and ensure that you enter the correct address, without typos. Since email addresses are usually the primary contact information for websites, it's considered worth the extra effort to try and make sure it gets entered correctly. It's sometimes called two-pass verification.


22

I feel it greatly eases the stress on my eyes after long hours of coding. 99% white screen on a bright monitor is asking for a headache. I also find this very funny, as in web design class in college we were told "NEVER DO THAT" to a webpage ... yet most developers using computers for a long time use it. Are we designing websites to not be used for long ...


22

There's nothing wrong with tweaking a UI based on which features are enabled for a customer, or which deployment types they have chosen, but the change should depend on meaningful flags, e.g. "HAVE_EXPORT" to enable/disable an exporting option, not on weird date comparisons. The UI has no business knowing the business rule about what was published when, it ...


15

CSS isn't trying to make things more difficult on purpose, it was designed with a far simpler goal in mind, variables and hierarchies are hardly its only shortcomings. LESS and Sass exist specifically to address these shortcomings, and until either capability is natively supported, you should stick with them. That said, W3C's CSS Working Group is working on ...


15

In this case, I would use "Pass As" (or "Pass"). You have a flow that perfectly matches this usage. Variable name: foo Pass as: ByVal / Pass: ByRef This fits your workflow perfectly and incidentally is exactly what the article you reference indicates. As you read through your options, it reads perfectly when using 'Pass As' as you can simply read ...


14

I firmly believe that it's more good for the eyes. When I sit in front of a monitor for 12 hours constant stream of light(white screen) is really tiring while the dark color is not so intense. Let me describe more of my setup. At home I use dual screen setup with dark themes and a lamp because I find my sensitive eyes work best when background is lit. ...


13

"Declarative UI" means you describe in some kind of language what elements you need in your UI, and to some degree how they should look like, but you can leave out details like the exact position and visual style of the elements. For example, in HTML you can describe that you want an input field, but how and where this field will be placed at the UI is ...


12

The problem(?): The customer (or end-user) does not complain about it (enough) Thus the project(/product) manager does not consider it a requirement Thus the developer does not get the time to fix it. You have to start at the beginning, educate the customers. But if they buy the iPhone instead of a faster, less shiny phone, the developers are right to ...


11

The requirement itself isn't problematic, but there are good and bad ways to implement it. If you have code copied and pasted all over the place that looks like: if (businessInitiationDate > cutoffDate) enableNewControlsForThisOneLittlePiece(); else enableOldControlsForThisOneLittlePiece(); That's going to be crazy hard to maintain, even if it ...


10

Linkedin do this for their mobile site (see http://engineering.linkedin.com/nodejs/blazing-fast-nodejs-10-performance-tips-linkedin-mobile part 4), and it's apparently been very beneficial for them from a performance standpoint. However, I'd suggest you avoid doing the same, for various reasons. The first is maintainability: C#/ASP.net is, due to it being ...


10

Greedy Algorithm When a slider moves up (down), all others need to move down (up). Each one has some space it can move (for down - their position, for up: 100-position). So when one slider moves, take the other sliders, sort them by the space they can move, and simply iterate through them. On each iteration, move the slider in the needed direction by (...


9

The biggest problem IMHO of UI Testing exclusively is that the permutations of things to be tested, even in a relatively simple app, are too great and the level too high to catch many potential defects. Code coverage is not going to be very high. You will probably find and locate some major items that will inhibit the users in a few scenarios (best case, ...


9

At my work, we started using UI tests in addition to our unit and integration tests. Of the three types, the UI tests take the longest to write and to run and catch the fewest amount of bugs. They are also extremely brittle, failing sporadically for no good reason. Because they take so long to run and do not pass consistently, we found that it was not worth ...


9

Those are different non-competing concepts and they can easily work together to produce a great result. In layman terms: MVVM is useful to get away from the codebehind (GUI/model coupling) clutter. Reactive approach is useful to reduce the event/callback clutter. I would recommend learning a bit about XAML/WPF since Microsoft is the original inventor of ...


8

Sadly, I find the biggest issue is you can't do everything. You have a ship date, and you know it's slow, but you NEED to get features X,Y,Z out to market. In your mind, slow you can fix later, but the app at least works. So, you worry about functionality and aesthetics (because users focus on aesthetics all to often). Next release you'll fix performance....


8

Use ExtJS if you want to go that way, don't reinvent the wheel. But be prepared, this means a complete paradigm change. You HTML skills are nearly obsolete. AJAX everywhere, the server mostly provides an AJAX API. You will write a lot more javascript than ever, so better make sure you are really fit with javascript.


8

The team I'm in decided to migrate to ExtJS late 2008. We had at that point a 200.000 line PHP app that suffered from front-end issues. Our situation was much worse than yours, because we had a handrolled form controls framework that was really bad, and we had heavy use of iframes to load sections of the page (the visual architecture dated back to 2005, and ...


8

Declarative UI is a UI that's designed in a declarative way (you describe what it should be like) rather than an imperative way (you code the steps to create it.) It's really nothing special or unusual; it's been around since at least the 1990s, when you had Visual Basic and Delphi with visual form designers that let you lay out the user interface of your ...


8

A long running algorithm certainly could use some method of indicating it's progress. But it would be inappropriate for the algorithm to know that it's talking to a progress bar. The algorithm should be able to talk to adapters that can take what the algorithm says about it's progress and turn it into a progress bar, a log file, or noise over an audio ...


7

You may use copy/paste to save typing the e-mail address twice but in doing so you are defeating the object of the repeated entry. Many e-mail addresses are long and as such are prone to entry error as you type. I have had addresses with the domains @freeserve.co.uk, @virginmedia.co.uk and @emsglobaltracking.com all of which are long enough for a finger ...


7

In an ideal (service oriented multi-tier) world UI should communicate to a business layer through data contracts and a service facade. The UI should not need to know anything about the actual business layer or the entities and methods the business layer works with. So a UI and service facade would share a data contract definition (these can be simple ...


6

I would return an empty array. It bothers me when people return null collections instead of empty collections. The majority of what I would be doing with your return value will be iterating over it, mapping over it etc. and my functions will work correctly with an empty array, but will either break, or have to be modified to deal with null The worst is when ...


6

Different historical background that now are unifying I must say the reason is the historical background. Web pages was simple text documents at the beginning, with forms. Then more and more functionallity was added with scripting (JavaScript) and separation of semantics (HTML) and design (CSS). GUI applications has always been applications with "...


6

I think its mostly a personal preference, very few people do extensive studies on their editor colorscheme. Over the last decades I found people justifying it with one or more of the following reasons (among which some were used for black on white too) They come from DOS or similar times, and it was like that always. When they started coding, there was a ...


6

Its a requirement, and while it appears to be smelly - basically configuration based on a datetime value - there's no reason time cannot be used to alter your UI. The classic case is a satnav display that changes from bright colours in daytime to a dark theme at night (and if you're really dedicated, a muted colour at in between). However, one thing I can ...


6

I would use either of these 3 terms to label a dropdown selecting that: Semantics Pass by Parameter modifier


6

This is not so much an indicator of bad practices as a strict test of your deployment process. Obviously it is very bad if debugging controls, content, backdoors etc. get into production environments. But if they help you achieve the same business goal faster, they save the company real money. Therefore the crucial factor is to ensure that they cannot get ...


5

Your refactoring is fine, especially if MonitorUrlsFromFile() is duplicated code. You don't need a "decoupling from the UI" sensibility to justify that refactoring; it can be justified on its own merits. The error propagation scheme depends on a number of factors. Generally, I use a BackgroundWorker object or thread or something similar to receive status ...


5

I'd be okay with either of the latter. I don't like the first one because you're changing the actual data type returned (int rather than array). Optimally, I'd go with the second one as it makes more semantic sense. If you're returning an array of selected items, then it makes more sense (again, semantically) to check array.length === 0 than array === null....


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