Search Results

Search found 12674 results on 507 pages for 'programming competitions'.

Page 87/507 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • Is the copy/paste approach professionally viable when working with the Google Maps API?

    - by Ian Campbell
    I find that I understand much of the Javascript concepts used in the Google Maps API code, but then again there is quite a bit that is way over my head in syntax. For example, the geocoder syntax seems to be of Ajax form, though I don't understand what is happening under the hood (especially with lines like results[0].geometry.location). I am able to modify the body of if (status == google.maps.GeocoderStatus.OK) for different purposes though. So, being that I am able to take various code from the Developer's Guide and rework it to an extent for my own purposes, all the while not fully understanding what Google Maps is actually doing, does this make me a copy-paste programmer? Is this a bad practice, or is this professionally viable? I am, of course, interested in learning as much as I can, but what if time-constraints outweigh the learning process?

    Read the article

  • Motivation and use of move constructors in C++

    - by Giorgio
    I recently have been reading about move constructors in C++ (see e.g. here) and I am trying to understand how they work and when I should use them. As far as I understand, a move constructor is used to alleviate the performance problems caused by copying large objects. The wikipedia page says: "A chronic performance problem with C++03 is the costly and unnecessary deep copies that can happen implicitly when objects are passed by value." I normally address such situations by passing the objects by reference, or by using smart pointers (e.g. boost::shared_ptr) to pass around the object (the smart pointers get copied instead of the object). What are the situations in which the above two techniques are not sufficient and using a move constructor is more convenient?

    Read the article

  • What are your worst experiences with whitespace?

    - by CheeseConQueso
    What are some good examples of whitespace being the cause of any type of error and/or total disruption of scripts and/or markups? I am more interested in any accounts related to languages that are used commonly today, but I would like to hear about any cases in general. PS - This should be a wiki, but I don't know what happened to the "make this a wiki" check box. If someone comes across this with the rights to set it as a "wiki", please do so. If SO decided they wanted to keep away from wiki's altogether, please comment me about that. Thanks

    Read the article

  • Is it bad practice to output from within a function?

    - by Nick
    For example, should I be doing something like: <?php function output_message($message,$type='success') { ?> <p class="<?php echo $type; ?>"><?php echo $message; ?></p> <?php } output_message('There were some errors processing your request','error'); ?> or <?php function output_message($message,$type='success') { ob_start(); ?> <p class="<?php echo $type; ?>"><?php echo $message; ?></p> <?php return ob_get_clean(); } echo output_message('There were some errors processing your request','error'); ?> I understand they both achieve the same end result, but are there benefits doing one way over the other? Or does it not even matter?

    Read the article

  • A more concise example that illustrates that type inference can be very costly?

    - by mrrusof
    It was brought to my attention that the cost of type inference in a functional language like OCaml can be very high. The claim is that there is a sequence of expressions such that for each expression the length of the corresponding type is exponential on the length of the expression. I devised the sequence below. My question is: do you know of a sequence with more concise expressions that achieves the same types? # fun a -> a;; - : 'a -> 'a = <fun> # fun b a -> b a;; - : ('a -> 'b) -> 'a -> 'b = <fun> # fun c b a -> c b (b a);; - : (('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'a -> 'c = <fun> # fun d c b a -> d c b (c b (b a));; - : ((('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'c -> 'd) -> (('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'a -> 'd = <fun> # fun e d c b a -> e d c b (d c b (c b (b a)));; - : (((('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'c -> 'd) -> (('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'd -> 'e) -> ((('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'c -> 'd) -> (('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'a -> 'e = <fun> # fun f e d c b a -> f e d c b (e d c b (d c b (c b (b a))));; - : ((((('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'c -> 'd) -> (('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'd -> 'e) -> ((('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'c -> 'd) -> (('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'e -> 'f) -> (((('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'c -> 'd) -> (('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'd -> 'e) -> ((('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'c -> 'd) -> (('a -> 'b) -> 'b -> 'c) -> ('a -> 'b) -> 'a -> 'f = <fun>

    Read the article

  • How Does The Maybe Monad Relate To The Option Type?

    - by Onorio Catenacci
    I was doing a presentation on F# and was discussing the Option type when someone in the audience asked me if the Option type is F#'s implementation of the maybe monad. I know that's not the case but I did want to ask how the two concepts are related. I mean it seems to me that an option type might be the result of the operation of a maybe monad but I'm not even sure of that. Would someone elucidate the relationship between the maybe monad and the option type in those functional languages which support it?

    Read the article

  • Is MUMPS alive?

    - by ern0
    At my first workplace we were using Digital Standard MUMPS on a PDP 11-clone (TPA 440), then we've switched to Micronetics Standard MUMPS running on a Hewlett-Packard machine, HP-UX 9, around early 90's. Is still MUMPS alive? Are there anyone using it? If yes, please write some words about it: are you using it in character mode, does it acts as web server? etc. (I mean Caché, too.) If you've been used it, what was your feelings about it? Did you liked it?

    Read the article

  • How to distribute applications?

    - by Dr Deo
    I am new to Ubuntu development. As a learning experience, I have written a custom chat application using qt4 and I want to deploy it in some sort of setup file. Whats the easiest way of deploying an application viz a viz setting desktop icons. automatically requesting for administrator privileges to execute. inserting an entry into the startup menu. automatically compress my application and reduce download size. automatic startup for my application without user intervention I am familiar with using NSIS scripts on Windows, but I don't know where to begin on Ubuntu. I would preffer a solution similar to NSIS scripts.

    Read the article

  • Why job postings always looking for "rockstars?"

    - by Xepoch
    I have noticed a recent trend in requesting programmers who are rockstars. I get it, they're looking for someone who is really good at what they do. But why (pray) make the reference to a rockstar? Do these companies really want these traits as a real rockstar? Party all night and wake up to take care of quick business in the morning? Substance abuse, Narcissism with celebrity, Compensation well exceeding their management, Excellent at putting on a short-lived show, Entertainment instead of value, 1 hit (project) wonders or single-genre performers, Et cetera What is wrong with Senior or Principal Software Engineer who has an established and proven passion for the business? Rather do we mean quite the opposite, someone who: rolls up the sleeves and gets to work, takes appropriate direction and helps influence teams, programs in lessons' learned and proper practices, provides timely communication to the whole team, can code and understand multiple languages, understands the science and theory behind computation, Is there a trend to diversify the software engineering ranks? How many software rockstars can you hire before your band starts breaking up? Sure, there are lots of folks doing this stuff on their own, maybe even a rare few who do coding for show, but I wager the majority is for business. I don't see ads for rockstar accountants, or rockstar machinists, or rockstart CFOs. What makes the software programmer and their hiring departments lean towards this kind of job title?

    Read the article

  • Test driven development - convince me!

    - by Casebash
    I know some people are massive proponents of test driven development. I have used unit tests in the past, but only to test operations that can be tested easily or which I believe will quite possibly be correct. Complete or near complete code coverage sounds like it would take a lot of time. What projects do you use test-driven development for? Do you only use it for projects above a certain size? Should I be using it or not? Convince me!

    Read the article

  • OpenGL ES 1 Pixel Error?

    - by Beginner001
    I am developing a game on android using OpenGL ES 1.0 for Android OS. It is a 2d game using a simple Orthographic projection and textures for the sprites. One of these textures has a small line (it looks like 1 pixel) all the way across the top that has the same colors as the bottom 1-pixel line of the texture. It is almost as if the bottom line of the image raster was copied and pasted as the top line as well. Is anyone familiar with this type of error? What could the problem be?

    Read the article

  • Arguments for or against using Try/Catch as logical operators

    - by James P. Wright
    I just discovered some lovely code in our companies app that uses Try-Catch blocks as logical operators. Meaning, "do some code, if that throws this error, do this code, but if that throws this error do this 3rd thing instead". It uses "Finally" as the "else" statement it appears. I know that this is wrong inherently, but before I go picking a fight I was hoping for some well thought out arguments. And hey, if you have arguments FOR the use of Try-Catch in this manner, please do tell. EDIT For any who are wondering, the language is C# and the code in question is about 30+ lines and is looking for specific exceptions, it is not handling ALL exceptions.

    Read the article

  • Is it bad to be the only person supporting software you have developed?

    - by trpt4him
    My employer has a need for a web-based application to manage and share data within the department, with approximately 50-75 possible users. I feel I have the ability to write it for them. I would likely use Python/Django with a MySQL database, so it would be open source. However, I'm the only IT person in my department (our larger organization has a separate IT support staff with which I often work, but not for web development). I want to develop this application, but if I leave in 1-2 years, and someone else has to come in after me and support it, will this be seen as a bad decision? This is assuming all the obvious points -- I will write documentation, I will comment my code, and I will strive to follow good application design principles. But will that be enough? In principle, is it acceptable for one person to develop and support an entire web application? Is this a "do first, then show and ask" kind of situation, or should I be certain it will be adopted by everyone involved first?

    Read the article

  • How to bring an application from Sublime Text to a web IDE for sharing?

    - by Kyle Pennell
    I generally work on my projects locally in Sublime Text but sometimes need to share them with others using things like Jsfiddle, codepen, or plunker. This is usually so I can get unstuck. Is there an easier way to share code that doesn't involve purely copy pasting and the hassle of getting all the dependencies right in a new environment? It's taking me hours to get some of my angular apps working in plunker and I'm wondering if there's a better way.

    Read the article

  • Languages like Tcl that have configurable syntax?

    - by boost
    I'm looking for a language that will let me do what I could do with Clipper years ago, and which I can do with Tcl, namely add functionality in a way other than just adding functions. For example in Clipper/(x)Harbour there are commands #command, #translate, #xcommand and #xtranslate that allow things like this: #xcommand REPEAT; => DO WHILE .T. #xcommand UNTIL <cond>; => IF (<cond>); ;EXIT; ;ENDIF; ;ENDDO LOCAL n := 1 REPEAT n := n + 1 UNTIL n > 100 Similarly, in Tcl I'm doing proc process_range {_for_ project _from_ dat1 _to_ dat2 _by_ slice} { set fromDate [clock scan $dat1] set toDate [clock scan $dat2] if {$slice eq "day"} then {set incrementor [expr 24 * 60]} if {$slice eq "hour"} then {set incrementor 60} set method DateRange puts "Scanning from [clock format $fromDate -format "%c"] to [clock format $toDate -format "%c"] by $slice" for {set dateCursor $fromDate} {$dateCursor <= $toDate} {set dateCursor [clock add $dateCursor $incrementor minutes]} { # ... } } process_range for "client" from "2013-10-18 00:00" to "2013-10-20 23:59" by day Are there any other languages that permit this kind of, almost COBOL-esque, syntax modification? If you're wondering why I'm asking, it's for setting up stuff so that others with a not-as-geeky-as-I-am skillset can declare processing tasks.

    Read the article

  • What problems can arise from emulating concepts from another languages?

    - by Vandell
    I've read many times on the web that if your language doesn't support some concept, for example, object orientation, or maybe function calls, and it's considered a good practice in this other context, you should do it. The only problem I can see now is that other programmers may find your code too different than the usual, making it hard for them to program. What other problems do you think may arise from this?

    Read the article

  • How can a developer realize the full value of his work [closed]

    - by Jubbat
    I, honestly, don't want to work as a developer in a company anymore after all I have seen. I want to continue developing software, yes, but not in the way I see it all around me. And I'm in London, a city that congregates lots of great developers from the whole world, so it shouldn't be a problem of location. So, what are my concerns? First of all, best case scenario: you are paying managers salary out of yours. You are consistently underpaid by making up for the average manager negative net return plus his whole salary. Typical scenario. I am a reasonably good developer with common sense who cares for readable code with attention to basic principles. I have found way too often, overconfident and arrogant developers with a severe lack of common sense. Personally, I don't want to follow TDD or Agile practices like all the cool kids nowadays. I would read about them, form my own opinion and take what I feel is useful, but don't follow it sheepishly. I want to work with people who understand that you have to design good interfaces, you absolutely have to document your code, that readability is at the top of your priorities. Also people who don't have a cargo cult mentality too. For instance, the same person who asked me about design patterns in a job interview, later told me that something like a List of Map of Vector of Map of Set (in Java) is very readable. Why would someone ask me about design patterns if they can't even grasp encapsulation? These kind of things are the norm. I've seen many examples. I've seen worse than that too, from very well paid senior devs, by the way. Every second that you spend working with people with such lack of common sense and clear thinking, you are effectively losing money by being terribly inefficient with your time. Yet, with all these inefficiencies, the average developer earns a high salary. So I tried working on my own then, although I don't like the idea. I prefer healthy exchange of opinions and ideas and task division. I then did a bit of online freelancing for a while but I think working in a sweatshop might be more enjoyable. Also, I studied computer engineering and you are in an environment in which your client will presume you don't have any formal education because there is no way to prove it. Again, you are undervalued. You could try building a product, yes. But, of course, luck is a big factor. I wonder if there is a way to work in something you can do well, software development, and be valued for the quality of your work and be paid accordingly, and where you and only you get fairly paid for the value you generate. I know that what I have written seems somehow unlikely but I strongly feel this way. Hopefully someone will understand me and has already figured this out. I don't think I'm alone in this kind of feeling.

    Read the article

  • What is the most efficient way to study multiple languages, frameworks, and APIs as a developer?

    - by Akromyk
    I know there are those out there who have read a slurry of books on a specific technology and only code in that one particular language, but this question is aimed at those who need bounce around between using multiple technologies and yet still manage to be productive. What is the most efficient way to study multiple languages, frameworks, and APIs as a developer without becoming a cheap swiss army knife? And how much time should one dedicate to a particular subject before moving to another?

    Read the article

  • How often is seq used in Haskell production code?

    - by Giorgio
    I have some experience writing small tools in Haskell and I find it very intuitive to use, especially for writing filters (using interact) that process their standard input and pipe it to standard output. Recently I tried to use one such filter on a file that was about 10 times larger than usual and I got a Stack space overflow error. After doing some reading (e.g. here and here) I have identified two guidelines to save stack space (experienced Haskellers, please correct me if I write something that is not correct): Avoid recursive function calls that are not tail-recursive (this is valid for all functional languages that support tail-call optimization). Introduce seq to force early evaluation of sub-expressions so that expressions do not grow to large before they are reduced (this is specific to Haskell, or at least to languages using lazy evaluation). After introducing five or six seq calls in my code my tool runs smoothly again (also on the larger data). However, I find the original code was a bit more readable. Since I am not an experienced Haskell programmer I wanted to ask if introducing seq in this way is a common practice, and how often one will normally see seq in Haskell production code. Or are there any techniques that allow to avoid using seq too often and still use little stack space?

    Read the article

  • Is committing/checking in code everyday a good practice?

    - by ArtB
    I've been reading Martin Fowler's note on Continuous Integration and he lists as a must "Everyone Commits To the Mainline Every Day". I do not like to commit code unless the section I'm working on is complete and that in practice I commit my code every three days: one day to investigate/reproduce the task and make some preliminary changes, a second day to complete the changes, and a third day to write the tests and clean it up^ for submission. I would not feel comfortable submitting the code sooner. Now, I pull changes from the repository and integrate them locally usually twice a day, but I do not commit that often unless I can carve out a smaller piece of work. Question: is committing everyday such a good practice that I should change my workflow to accomodate it, or it is not that advisable? Edit: I guess I should have clarified that I meant "commit" in the CVS meaning of it (aka "push") since that is likely what Fowler would have meant in 2006 when he wrote this. ^ The order is more arbitrary and depends on the task, my point was to illustrate the time span and activities, not the exact sequence.

    Read the article

  • Sucking Less Every Year ?

    - by AdityaGameProgrammer
    Sucking Less Every Year A trail of thought that had been on my mind for a while Quoting directly from the post I've often thought that sucking less every year is how humble programmers improve. You should be unhappy with code you wrote a year ago. If you aren't, that means either A) you haven't learned anything in a year, B) your code can't be improved, or C) you never revisit old code. All of these are the kiss of death for software developers. How often does this happen or not happen to you? How long before you see an actual improvement in your coding ? month, year? Do you ever revisit Your old code? How often does your old code plague you? or how often do you have to deal with your technical debt. It is definitely very painful to fix old bugs n dirty code that we may have done to quickly meet a deadline and those quick fixes ,some cases we may have to rewrite most of the application/code. No arguments about that. Some of the developers i had come across argued that they were already at the evolved stage where their coding doesn't need improvement or cant get improved anymore. Does this happen? If so how many years into coding on a particular language does one expect this to happen?

    Read the article

  • Make a flowchart to demonstrate closure behavior

    - by thomas
    I saw below test question the other day in which the author's used a flow chart to represent the logic of loops. And I got to thinking it would be interesting to do this with some more complex logic. For example, the closure in this IIFE sort of boggles me. while (i <= qty_of_gets) { // needs an IIFE (function(i) promise = promise.then(function(){ return $.get("queries/html/" + product_id + i + ".php"); }); }(i++)); } I wonder if seeing a flowchart representation of what happens in it could be more elucidating. Could such a thing be done? Would it be helpful? Or just messy? I haven't the foggiest clue where to start, but thought maybe someone would like to take a stab. Probably all the ajax could go and it could just be a simple return within the IIFE.

    Read the article

  • Can a candidate be judged by asking to write a complex program on "paper"?

    - by iammilind
    Sometime back in an interview, I was asked to write following program: In a keypad of a mobile phone, there is a mapping between number and characters. e.g. 0 & 1 corresponds to nothing; 2 corresponds to 'a','b','c'; 3 corresponds to 'd','e','f'; ...; 9 corresponds to 'w','x','y','z'. User should input any number (e.g. 23, 389423, 927348923747293) and I should store all the combinations of these character mapping into some data structure. For example, if user enters "23" then possible character combinations are: ad, ae, af, bd, be, bf, cd, ce, cf or if user enters, "4676972" then it can be, gmpmwpa, gmpmwpb, ..., hnroxrc, ..., iosozrc Interviewer told that people have written code for this within 20-30 mins!! Also he insisted I have to write on paper. If I am writing a code then my tendency is as of I am writing production code, even though it may not be expected from me. So, I always try to think all the aspects like, optimization, readability, maintainability, extensible and so on. Considering all these, I felt that I should be writing on PC and it needs decent 2 hours. Finally after 25 mins, I was able to come up with just the concept and some shattered pieces of code (not to mention of my rejection). My question is not the answer for the above program. I want to know that is this a right way to judge the caliber of a person ? Am I wrong / too slow in the estimates ? Am I too idealistic ?

    Read the article

  • What software do you use to help plan your team work, and why?

    - by Alex Feinman
    Planning is very difficult. We are not naturally good at estimating our own future, and many cognitive biases exacerbate the problem. Group planning is even harder. Incomplete information, inconsistent views of a situation, and communication problems compound the difficulty. Agile methods provide one framework for organizing group planning--making planning visible to everyone (user stories), breaking it into smaller chunks (sprints), and providing retrospective analysis so you get better at planning. But finding good tools to support these practices is proving tricky. What software tools do you use to achieve these goals? Why are you using that tool? What successes have you had with a particular tool?

    Read the article

  • Do any OO languages support a mechanism to guarantee an overriden method will call the base?

    - by Aaron Anodide
    I think this might be a useful language feature and was wondering if any languages already support it. The idea is if you have: class C virtual F statement1 statement2 and class D inherits C override F statement1 statement2 C.F() There would be a keyword applied to C.F() such that removing the last line of code above would cause a compiler error because it's saying "This method can be overridden but the implementation here needs to run no matter what".

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >