Search Results

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

Page 138/507 | < Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >

  • Why is the 'if' statement considered evil?

    - by Vadim
    I just came from Simple Design and Testing Conference. In one of the session we were talking about evil keywords in programming languages. Corey Haines, who proposed the subject, was convinced that if statement is absolute evil. His alternative was to create functions with predicates. Can you please explain to me why if is evil. I understand that you can write very ugly code abusing if. But I don't believe that it's that bad.

    Read the article

  • memristor is a new paradigm (fourth element in integrated circuits)? [closed]

    - by lsalamon
    The memristor will bring a new paradigm of programming, opened enormous opportunities to enable the machines to gain knowledge, creating a new paradigm toward the intelligence altificial. Do you believe that we are paving the way for the era of intelligent machines? More info about : Brain-like systems? "As for the human brain-like characteristics, memristor technology could one day lead to computer systems that can remember and associate patterns in a way similar to how people do. This could be used to substantially improve facial recognition technology or to provide more complex biometric recognition systems that could more effectively restrict access to personal information. These same pattern-matching capabilities could enable appliances that learn from experience and computers that can make decisions." [EDITED] The way is open. News on the subject Brain-Like Computer Closer to Realization

    Read the article

  • Learning how to program real things.

    - by Sean
    How would you guys recommend I actually learn to program real things? I mean, I know how to do basic academic things. I can implement a templated stack/queue/map/etc. data structure in C++ or Java or whatever. I can make a text-based hangman game or whatever. Etc etc. But how can I learn to program something real, something useful? I've done project Euler up to question 100 or so, and I feel like that's given me more mathematical maturity but not programming maturity. Should I buy a book and follow exercises, struggle through interesting projects, etc, ? In short, how did you guys transition from academic exercises to real, fun and/or useful programs?

    Read the article

  • Strange client's address returned throug accept(..) function.

    - by Negai
    Hi everyone, I'm a socket programming newbie. Here's a snippet: struct sockaddr_storage client_addr; ... client_addr_size = sizeof(client_addr); client_socket = accept( server_socket, (struct sockaddr *)&client_addr, &client_addr_size ); ... result = inet_ntop( AF_INET, &((struct sockaddr_in *)&client_addr)->sin_addr, client_addr_str, sizeof(client_addr_str) ); Whenever the client connects the address I get is 0.0.0.0 regardless from the host. Can anybody explain, what I'm doing wrong? Thanks.

    Read the article

  • What languages allow cross-platform native executables to be created?

    - by JT
    I'm frustrated to discover that Java lacks an acceptable solution for creating programs that will run via double-click. Other than .NET for Windows, what modern and high-level programming languages can I write code in that can be compiled for various platforms and run as a native/binary in each (Windows, Linux, OSX (optional)) Assuming I wanted to write code in python, for instance, is there a cohesive way that I could distribute my software which wouldn't require users to do anything special to get it to run? I want to write and distribute software for computer-illiterate and Java has turned out to be a real pain in this respect.

    Read the article

  • Must a Language that Implements Monads be Statically Typed?

    - by Morgan Cheng
    I am learning functional programming style. From this link http://channel9.msdn.com/shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads/, Brian Beckman gave a brilliant introduction about Monad. He mentioned that Monad is about composition of functions so as to address complexity. A Monad includes a unit function that transfers type T to an amplified type M(T); and a Bind function that, given function from T to M(U), transforms type M(T) to another type M(U). (U can be T, but is not necessarily). In my understanding, the language implementing monad should be type-checked statically. Otherwise, type errors cannot be found during compilation and "Complexity" is not controlled. Is my understanding correct?

    Read the article

  • Is there a smart web developer language skill combination?

    - by Cryo
    I'm no newbie to programming, but I'm making the move to a career in web development, and I've noticed that so many job postings have different combinations of skill requirements: (PHP, C#, XML, XHTML/CSS, ASP, .NET, jQuery, YUI, Joomla, Ruby, Perl, Python, Java, Javascript... the list goes on.) As of now, I've started learning XHTML, CSS, JavaScript, jQuery, PHP, and mySQL, but with so many combinations, I want to plan ahead to have a marketable combination of skills as early on as possible. Am I on the right path? What is vital for a marketable web programmer's arsenal? Thanks for your thoughts.

    Read the article

  • Eclipse And Linux: Keyboard unusable after gnome-screen-saver

    - by Martijn Courteaux
    Hi, I know this is not programming related. But I can't find any topics on Google or UbuntuForums. So the problem is: When gnome-screensaver starts on the moment Eclipse has the focus and I wake up again my laptop, Eclipse doesn't listen to keyboard-events. To solve this I have to change the focus to another program and then back to Eclipse. Than it works again. This isn't a real problem, but it would be nice if someone can solve it. Thanks

    Read the article

  • How do I know if I'm being truly clever and not just "clever"?

    - by Covar
    If there's one thing I've learned from programming is that there are clever solutions to problems, and then there are "clever" solutions to problems. One is an intelligent solution to a difficult problem that results in improved efficiency and a better way to to do something and the other will wind up on The Daily WTF, and result in headaches and pain for anyone else involved. My question is how do you distinguish between one and the other? How do you figure out if you've over thought the solution? How do you stop yourself from throwing away truly clever solutions, thinking they were "clever"?

    Read the article

  • How do you learn a class hierarchy quickly?

    - by rsteckly
    Hi, Something I don't enjoy about programming is learning a new API. For example, right now I'm trying to learn Windows Identity Foundation. Its frustrating because I'm going to spend the bulk of the time learning how a few classes work and actually only write several lines of code. In .NET, there are so many types that I seem to spend more time hunting around in msdn for a class than writing code. It also interrupts my workflow while I'm working because I have to type a little bit than look something up. Obviously, I don't have to do this for the basic classes. Whenever new things come though there is definitely some looking up to do. Then I often don't reuse that class enough to really review it or bring it into action. I'm wondering if anybody out there has a found a way to memorize (or look up more efficiently) these object model hierarchies?

    Read the article

  • Pure functional bottom up tree algorithm

    - by Axel Gneiting
    Say I wanted to write an algorithm working on an immutable tree data structure that has a list of leaves as its input. It needs to return a new tree with changes made to the old tree going upwards from those leaves. My problem is that there seems to be no way to do this purely functional without reconstructing the entire tree checking at leaves if they are in the list, because you always need to return a complete new tree as the result of an operation and you can't mutate the existing tree. Is this a basic problem in functional programming that only can be avoided by using a better suited algorithm or am I missing something?

    Read the article

  • Program LED with just USB port

    - by LifeH2O
    I want to control LED with C# using only USB port. I don't want to attach any other device with USB. I just want to attach LED directly to USB port pins and program it (blink etc). How can i do that? I am new to hardware programming and it will be my first program. EDIT: I can do it already (blink LED) using printer port by attaching one led pin to data pin and other to ground. How can i do the same with USB port? My motherboard does not have a printer port. USB is the only option.

    Read the article

  • What to do when you are a programmer and have a cold?

    - by Zak
    If you have a cold that isn't too bad, does it make sense to still go into the office and get some coding done? Assume a private office, no meetings for the day, and you have some documentation and coding tasks that need to get done. Also assume that you operate on a PTO system, where all days off are "vacation" or PTO. To clarify, should one just not code at all when under the weather? That's what I'm getting at. Will you just kick yourself in your own rear when you go back to deal with code you wrote when you are sick? What is the error defect rate of sick vs non-sick programming hours?

    Read the article

  • How to create a language these days?

    - by Mike
    I need to get around to writing that programming language I've been meaning to write. How do you kids do it these days? I've been out of the loop for over a decade; are you doing it any differently now than we did back in the pre-internet, pre-windows days? You know, back when "real" coders coded in C, used the command line, and quibbled over which shell was superior? Just to clarify, I mean, not how do you DESIGN a language (that I can figure out fairly easily) but how do you build the compiler and standard libraries and so forth? What tools do you kids use these days?

    Read the article

  • Is it easier to write filesystem drivers in userspace than in kernel space?

    - by Jack
    I will use the Linux NTFS driver as an example. The Linux kernel NTFS driver only has very limited write support in the kernel, and after 5 years it is still considered experimental. The same development team creates the ntfsmount userspace driver, which has almost perfect write support. Likewise, the NTFS-3G project which is written by a different team also has almost perfect write support. Why has the kernel drive taken so much longer? Is it much harder to develop for? Saying that there already exists a decent userspace application is not a reason why the kernel driver is not compelte. NOTE: Do not migrate this to superuser.com. I want a programing heavy answer, from a programming perspective, not a practical use answer. If the question is not appropriate for SO, please advise me as to why so I can edit it so it is.

    Read the article

  • Is a function kind of like a static method?

    - by lkm
    I'm a java programmer and am trying to understand the difference between a method (java methods) and a function (such as in c++). I used to think that they are the same, just different naming conventions for different programming languages. But now that I know they are not, I am having trouble understanding the difference. I know that a method relates to an instance of a class and has access to class data (member variables), while a function does not (?). So is a function kind of like a static method? See here for explanations I read which led me to think this.

    Read the article

  • What will be the value of i in the following pseudocode?

    - by user283403
    I got this question in a programming test. Do you think this question is even correct? Look at the answer choices. (2^x means 2 raised to x) Consider the following pseudocode. x := 1; i := 1; while (x = 1000) begin x := 2^x; i := i + 1; end; What is the value of i at the end of the pseudocode? a) 4 b) 5 c) 6 d) 7 e) 8 I am sure that the value of i will 1. I told the examiner of the discrepancy and he advised me the leave the question unanswered if I felt it was incorrect. What else could I have done?

    Read the article

  • What is the weirdest language you have ever programmed in?

    - by sfoulk526
    For me, it was Forth, way back at the end of the eighties! Yes, almost prehistory. But I was an un-degree-ed programmer, unable to afford college, self-taught C and Assembly, and not enough experience to open doors. I was invited to work in software engineering, my dream job by the engineering manager of my company, but...I had to do it in Forth, and the company was willing to teach me. The position was my start into embedded systems programming, and man did I learn a lot! Like, just how easy C and Assembly language REALLY could be! But it was a good journey, and though I never coded again in Forth, my fear of not being able to learn C and Assembly proficiently disappeared... ;-)

    Read the article

  • How to create a Windows GUI with a file explorer window, allowing users to choose files?

    - by Badri
    Here's what I want to do. I want to present a file explorer, and allow the user to select files, and list the selected files below. (I then want to process those files but that's the next part) For example, the way CD Burning softwares work. I have created a mock up here http://dl.dropbox.com/u/113967/Mockup.png As you can see, the left frame has a directory structure, the right frame has a file selected, and the bottom frame shows the selected file. What framework can I go about creating this? I am familiar with command line C++ stuff, but I haven't ventured into any GUI programming, and figured this idea would be a good place to start. Any suggestions on where to start?

    Read the article

  • How do I change careers to become a programmer without spending a lot of money

    - by bgc83
    I'm currently a network engineer, but find myself wanting to get into the world of development. I took a little bit of Java in college, am 27 years old and have been network engineering for 4 years now. I have a mortgage and student loans so going back to school would be difficult. I'm willing to put in however much hardwork is needed around my full time job to learn, but part of me feels I may need actuall schooling to get down some of the advanced concepts. Just looking for a little advice and direction. I have purchased a bunch of the Head First programming books and have begun reading through some of them as I figure out my way into this transition.

    Read the article

  • Given a number N, find the number of ways to write it as a sum of two or more consecutive integers

    - by hilal
    Here is the problem (Given a number N, find the number of ways to write it as a sum of two or more consecutive integers) and example 15 = 7+8, 1+2+3+4+5, 4+5+6 I solved with math like that : a + (a + 1) + (a + 2) + (a + 3) + ... + (a + k) = N (k + 1)*a + (1 + 2 + 3 + ... + k) = N (k + 1)a + k(k+1)/2 = N (k + 1)*(2*a + k)/2 = N Then check that if N divisible by (k+1) and (2*a+k) then I can find answer in O(N) time Here is my question how can you solve this by dynamic-programming ? and what is the complexity (O) ? P.S : excuse me, if it is a duplicate question. I searched but I can find

    Read the article

  • In which language the KIS application might have been developed??

    - by Jeba
    Hello all, I just went through this link http://www.pcauthority.com.au/Feature/91093,the-tsar-of-antivirus.aspx and found that it's developed using c/c++ and visual studio with a little assembly language support. As a programmer i just want to know in what programming language the kaspersky internet security User Interface(UI) has been developed? Might be using QT(coz. of c++)? or using MFC(coz. of visual studio)?? With side tab like thing the UI looks good. Expecting the answers from expert analysts.

    Read the article

  • Clojure for a lisp illiterate

    - by dbyrne
    I am a lifelong object-oriented programmer. My job is primarily java development, but I have experience in a number of languages. Ruby gave me my first real taste of functional programming. I loved the features Ruby borrowed from the functional paradigm such as closures and continuations. Eventually, I graduated to Scala. This has been a great way to gradually learn to approach non-trivial problems in a functional manner. Now I am interested in Clojure. I know all the sexy features that make it enticing (software transactional memory, macros, etc.), but I just can't get used to "thinking in lisp". I've seen Rich Hickey's screencasts aimed at java programmers, but they are geared towards explaining language features and not approaching real world problems. I am looking for any advice or resources which have made this transition easier for others.

    Read the article

  • Write the longest possible loop.

    - by Abhay
    Hello Group, Recently I was asked this question in a technical discussion. What is the longest possible loop that can be written in a programming language? This loop has to be as long as possible and yet not an infinite loop and should not end-up crashing the program (Recursion etc...) I honestly did not know how to attack this problem, so I asked him if is it practically possible. He said using some computer science concepts, you can arrive at a hypothetical number which may not be practical but nevertheless it will still not be infinite. Anyone here; knows how to analyse / attack this problem. P.S. Choosing some highest limit for a type that can store the highest numerical value is apparently not an answer. Thanks in advance,

    Read the article

  • Is there a way of providing a final transform method when chaining operations (like map reduce) in underscore.js?

    - by latentflip
    (Really strugging to title this question, so if anyone has suggestions feel free.) Say I wanted to do an operation like: take an array [1,2,3] multiply each element by 2 (map): [2,4,6] add the elements together (reduce): 12 multiply the result by 10: 120 I can do this pretty cleanly in underscore using chaining, like so: arr = [1,2,3] map = (el) -> 2*el reduce = (s,n) -> s+n out = (r) -> 10*r reduced = _.chain(arr).map(map).reduce(reduce).value() result = out(reduced) However, it would be even nicer if I could chain the 'out' method too, like this: result = _.chain(arr).map(map).reduce(reduce).out(out).value() Now this would be a fairly simple addition to a library like underscore. But my questions are: Does this 'out' method have a name in functional programming? Does this already exist in underscore (tap comes close, but not quite).

    Read the article

< Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >