Search Results

Search found 17731 results on 710 pages for 'programming practices'.

Page 9/710 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Functional programming compared to OOP with classes

    - by luckysmack
    I have been interested in some of the concepts of functional programming lately. I have used OOP for some time now. I can see how I would build a fairly complex app in OOP. Each object would know how to do things that object does. Or anything it's parents class does as well. So I can simply tell Person().speak() to make the person talk. But how do I do similar things in functional programming? I see how functions are first class items. But that function only does one specific thing. Would I simply have a say() method floating around and call it with an equivalent of Person() argument so I know what kind of thing is saying something? So I can see the simple things, just how would I do the comparable of OOP and objects in functional programming, so I can modularize and organize my code base? For reference, my primary experience with OOP is Python, PHP, and some C#. The languages that I am looking at that have functional features are Scala and Haskell. Though I am leaning towards Scala. Basic Example (Python): Animal(object): def say(self, what): print(what) Dog(Animal): def say(self, what): super().say('dog barks: {0}'.format(what)) Cat(Animal): def say(self, what): super().say('cat meows: {0}'.format(what)) dog = Dog() cat = Cat() dog.say('ruff') cat.say('purr')

    Read the article

  • Pair Programming, for or against? [on hold]

    - by user1037729
    I believe it has many advantages over individual programming: Pros By pairing senior with relatively junior staff, the more junior can get up to speed with both project and computing experience, and the senior will re-think the problem in order to communicate with the junior, thus re-checking his own thinking (rubber duck principle!). At least 2 people will know about any single piece of work, if one person is away the other can cover, or if some one leaves a project knowledge transfer is easier. Two brains on a complex task is more effective, communication keeps the work free flowing and provides redundancy in decision making. Code is effectively reviewed as its being written, no need for a separate reviewing phase which requires a context switch as someone who has not been working on the piece in question would be required to understand and review the related code. Reviewing code on your own which you haven't written or architected is not fun, hence counter productive. Cons Less bandwith for performing tasks, lets say we have 4 devs, pair programming requires 2 devs per task, so we would be doing 2 tasks concurrently as a posed to 4. I believe this "Con" does not stand up as the pair programmed task would complete sooner and comes with a review built in for free! Ie the pair programming task would be more efficient and thus free up resources earlier. Less flexibility to chop and change tasks as two developers are tied into a task, when flexibility is required this could be a problem.

    Read the article

  • What technologies are used for Game development now days?

    - by Monika Michael
    Whenever I ask a question about game development in an online forum I always get suggestions like learning line drawing algorithms, bit level image manipulation and video decompression etc. However looking at games like God of War 3, I find it hard to believe that these games could be developed using such low level techniques. The sheer awesomeness of such games defy any comprehensible(for me) programming methodology. Besides the gaming hardware is really a monster now days. So it stands to reason that the developers would work at a higher level of abstraction. What is the latest development methodology in the gaming industry? How is it that a team of 30-35 developers (of which most is management and marketing fluff) able to make such mind boggling games? If the question seems too general could you explain the architecture of God of War 3? Or how you would go about producing a clone? That I think should be objectively answerable.

    Read the article

  • Programmers and tech email: Do you actually read all of them?

    - by AdityaGameProgrammer
    Email Alerts, Blog /Forum updates, discussion subscriptions general programming/technology update emails that we often subscribe to.Do you actually read them ? or go direct to the source when you find time. often we might the mail of programmers filled with loads of unread subscription mail from technology they previously were following or worked on or things they wish to follow .some or a majority of these mail just keep on piling up . i personally have few updates that i wish i read but constantly avoid and keep of for latter and finally delete them in effort keep the in box clean. few questions come to mind regarding this Do you keep such mail in separate accounts? Do you read all the mail you have subscribed to? Do you ever unsubscribe to any such email if you aren't reading them? How much do you really value these email. Lastly do you keep your in box clean ? wish to deal with this in a better way.

    Read the article

  • Transiltion from maintenance programing to design

    - by andrew wang
    What to do guys do develop a design for a s/w for a given set of requirements? I like many people joined a Semiconductor MNC and got stuck in maintenance for quite a couple of years. My work was usually changing a lines of code for windows drivers supplied by my company or a couple of small script (style like) C programs for validating h/w. As a result I developed the bad habit of 'programming by coincidence'. I have not developed the ability for designing tools/programs from scratch. I was the only s/w member of the local team and thus some grunt work from the well established other site of the company came to be done by me. Now I have moved to a different company and thus finding developing from scratch very difficult. How do I unlearn my bad habit and develop this ability of designing s/w and then coding it ?

    Read the article

  • Languages/Methods to Learn for Scientific Computing?:

    - by Zéychin
    I'm a second-semester Junior working towards a Computer Science degree with a Scientific Computing concentration and a Mathematics degree with a concentration on Applied Discrete Mathematics. So, number crunching and such rather than a bunch of regular expressions, interface design, and networking. I've found that I'm not learning new relevant languages from my coursework and am interested in what the community would recommend me to learn. I know as far as programming methods go, I need to learn more about parallelizing programs, but if there's anything else you can recommend, I would appreciate it. Here's a list of the languages with which I am very experienced (web technologies omitted as they barely apply here). Any recommendations for additional languages I should learn would be very much appreciated!: Java C C++ Fortran77/90/95 Haskell Python MATLAB

    Read the article

  • What are QUICK interview questions for the Microsoft stack development jobs?

    - by Dubmun
    I'm looking for your best "quick answer" technical interview questions. We are a 100% Microsoft shop and do the majority of our development on the ASP.NET web stack in C# and have a custom SOA framework also written in C#. We use a combination of Web Forms, MVC, Web Services, WCF, Entity Framework, SQL Server, TSQL, jQuery, LINQ, and TFS in a SCRUM environment. We are currently on .NET 3.5 with a very near transition to .NET 4.0. Our interviewing process includes a 55 minute interview with two technical people (usually an architect and a senior developer). The two interviewers have to share the time for questions. That isn't enough time for very many true programming problems so I'm looking for more good questions that have quick, yet meaningful, answers. We are mainly interviewing for Senior Dev positions right now but may interview for some Juniors in the future. Please help?

    Read the article

  • How to choose a new technology for mastering and not lose sense of reality and practicality?

    - by Eyewan
    How to choose the right next step in learning programming and mastering new technologies? I have experience with WinForms applications in C# .NET. Next what I see as a good area of expanding the knowledge is ASP.NET. Language I already know, C #, so I think there is now more a matter of mastering new technologies. Also I have interest in WPF. Perhaps the best is to work on ASP.NET and WPF at the same time. Sometimes the problem is when we do not have motivation, but also known to become a problem when we want to much :) How to choose a new technology for mastering and not lose sense of reality and practicality?

    Read the article

  • Code to simulate a users actions, such as logging in

    - by Gortron
    I've recently begun working on a PHP application, replacing another developer. I believed the application was using an API to communicate with a remote service but when I looked through the code I found that it was using a set of functions to actually log in, fill out forms and submit them as a user might do in a browser. My intention is to replace this code, to use the services API instead. I've considered leaving the code as is and not replace it. It makes me wonder though is this a common practice in the software industry? To have a programme simulate a users actions in a browser to perform a set of actions? It feels to me that this is clever but poor programming, Have any other developers seen this?

    Read the article

  • Does FP mess up your OOP skills?

    - by bonomo
    I've been learning functional programming in Haskell and F# for awhile and now when I got some skills it gets harder for me to think in OOP way and program in C# and JavaScript. Everything seems to be ass-backwards there with classes, interfaces, objects and I often stare at the screen trying to think of a better way around without using them. This is something that scares me, because I didn't have problems like that before (not knowing that the same stuff can be done in a different way). So I am concerned as I don't want to loose myself as a OOP developer, because this is what I do for living. Is it a normal thing? Shall I rather stop doing FP? How did you manage to cope with it?

    Read the article

  • Parallel programming patterns for C#?

    - by VoidDweller
    With Intel's launch of a Hexa-Core processor for the desktop, it looks like we can no longer wait for Microsoft to make many-core programming "easy". I just order a copy of Joe Duffy's book Concurrent Programming on Windows. This looks like a great place to start, though, I am hoping some of you who have been targeting multi/many core systems would point me to some good resources that have or would have helped on your projects?

    Read the article

  • Question about separating game core engine from game graphics engine...

    - by Conrad Clark
    Suppose I have a SquareObject class, which implements IDrawable, an interface which contains the method void Draw(). I want to separate drawing logic itself from the game core engine. My main idea is to create a static class which is responsible to dispatch actions to the graphic engine. public static class DrawDispatcher<T> { private static Action<T> DrawAction = new Action<T>((ObjectToDraw)=>{}); public static void SetDrawAction(Action<T> action) { DrawAction = action; } public static void Dispatch(this T Obj) { DrawAction(Obj); } } public static class Extensions { public static void DispatchDraw<T>(this object Obj) { DrawDispatcher<T>.DispatchDraw((T)Obj); } } Then, on the core side: public class SquareObject: GameObject, IDrawable { #region Interface public void Draw() { this.DispatchDraw<SquareObject>(); } #endregion } And on the graphics side: public static class SquareRender{ //stuff here public static void Initialize(){ DrawDispatcher<SquareObject>.SetDrawAction((Square)=>{//my square rendering logic}); } } Do this "pattern" follow best practices? And a plus, I could easily change the render scheme of each object by changing the DispatchDraw parameter, as in: public class SuperSquareObject: GameObject, IDrawable { #region Interface public void Draw() { this.DispatchDraw<SquareObject>(); } #endregion } public class RedSquareObject: GameObject, IDrawable { #region Interface public void Draw() { this.DispatchDraw<RedSquareObject>(); } #endregion } RedSquareObject would have its own render method, but SuperSquareObject would render as a normal SquareObject I'm just asking because i do not want to reinvent the wheel, and there may be a design pattern similar (and better) to this that I may be not acknowledged of. Thanks in advance!

    Read the article

  • First time application where to start?

    - by Nazariy
    After many years of searches and copy pasting, I'm still looking for simple solution that can transliterate text input on the fly from one key set to another. There are quite few online services that provide this feature but it still quite annoying to go online all the time. Unfortunately there is not that many applications left which are capable of doing so, and none of them supported by this day. I decided to make my own and at same time to learn something new for my self. The idea is quite simple: application should sit in system tray and wait until input language get changed, for example to Russian. If Russian language is activated, application should start to listen for user key strokes combination and replace them based on custom dictionary for example R = ?, SH = ? etc. I should be able to bind application to any installed language (Russian, Ukrainian, Bulgarian, Belarusian etc.) and customise dictionary for any of them. So my question is: Which language should I chose for this task C++, C# or might be something hardcore like Assembler, as application should work natively with Windows XP/Vista/7 or possibly Mac. (cross platform support is good but my main target is Windows) Due to nature of application behaviour how can I tell anti-virus software that it is not a "Key Logger" and basically not a virus? Where should I start and what should I be aware of? P.S. My current programming knowledge is quite basic, PHP and JavaScript with Object Oriented approach.

    Read the article

  • Is it OK to use dynamic typing to reduce the amount of variables in scope?

    - by missingno
    Often, when I am initializing something I have to use a temporary variable, for example: file_str = "path/to/file" file_file = open(file) or regexp_parts = ['foo', 'bar'] regexp = new RegExp( regexp_parts.join('|') ) However, I like to reduce the scope my variables to the smallest scope possible so there is less places where they can be (mis-)used. For example, I try to use for(var i ...) in C++ so the loop variable is confined to the loop body. In these initialization cases, if I am using a dynamic language, I am then often tempted to reuse the same variable in order to prevent the initial (and now useless) value from being used latter in the function. file = "path/to/file" file = open(file) regexp = ['...', '...'] regexp = new RegExp( regexp.join('|') ) The idea is that by reducing the number of variables in scope I reduce the chances to misuse them. However this sometimes makes the variable names look a little weird, as in the first example, where "file" refers to a "filename". I think perhaps this would be a non issue if I could use non-nested scopes begin scope1 filename = ... begin scope2 file = open(filename) end scope1 //use file here //can't use filename on accident end scope2 but I can't think of any programming language that supports this. What rules of thumb should I use in this situation? When is it best to reuse the variable? When is it best to create an extra variable? What other ways do we solve this scope problem?

    Read the article

  • How often is your "Go-To" language the same as your favorite??

    - by K-RAN
    I know that there's already a question asking for your favorite programming language here. I'm curious though, what's your go-to language? The two can be very different. For example, I love Haskell. I learned it this past semester and I fell in love with it's very concise solutions and awesome syntax (I love theoretical math so something like fib = 1 : 1 : [ f | f <- zipWith (+) fibSeq (tail fibSeq)] makes my inner mathematician and computer scientist jump with joy!). However, the majority of my projects for classes and jobs have been in C/C++ & Java. As a result, most of the time when I'm testing something like an algorithm or Data Structure I go straight to C++. What about you guys? What languages do you love and why? What about your go-to language? What language do you use most often to get things done for work or personal projects and why? How often does a language fall into both categories??

    Read the article

  • What are some best practices for cookie based web authentication?

    - by rdasxy
    I'm working on a small side project using CGI and Python (scalability is not an issue and it needs to be a VERY simple system. I was thinking of implementing authentication using cookies, and was wondering if there were any established best practices. When the user successfully authenticates, I want to use cookies to figure out who is logged on. What, according to the best practices, should be stored in such a cookie?

    Read the article

  • Can aptitude for learning Programming paradigms be influenced by culture or native language's gramma

    - by DVK
    It is well known that different people have different aptitudes regarding various programming paradigms (e.g. some people have trouble learning non-procedural, especially functional languages. Some people have trouble understanding pointers - see Joel Spolsky's blog for musings on that. Some people have trouble grasping recursion). I was recently reading about a study that looked at how the grammar of someone's native language affected their speed of learning math. Can't find that article now but a quick googling found this reference. That led me to wondering whether someone's native culture or first language might affect their aptitude towards various programming paradigms. I'm more curious about positive influences - e.g. some trait that make it easier/faster for someone to learn a particular paradigm, for example native language grammar being very recursion-oriented. To be clear, I'm looking for how culture/language grammare may affect the difference between aptitude of the same person towards various paradigms as opposed to how it affects overall aptitude towards programming between different persons. Important: the only answers I'm interested in are either references to scientific studies, or personal observations from someone intimately familiar with a particular culture/language, including from their own experience. E.g. I'm not interested in your opinion of how Chinese being your first language affects anything unless you speak Chinese or worked with extremely large set of Chinese-native programmers extensively. I'm OK with your guesstimates not based on scientific studies, but please be sure to supply your reasoning about plausible causes of your observation. I'm not interested in culture-bashing (any such commends will be deleted or flagged for deletion). I'm also not particularly interested in culture-building - we all know Linus is from Finland and Tetris was written in Russia and Larry Wall is an American. Any culture/nation can produce a brilliant mind in any discipline. I'm interested in averages.

    Read the article

  • Programming languages, positional languages and natural languages

    - by Vitalij Zadneprovskij
    Some programming languages are modeled on machine code, like assembly languages. Other languages are modeled on a natural language, the English language. Others are not modeled on either machine code or natural language. Languages such as PROLOG, for example, don't follow either model. I came across this Perl module Lingua::Romana::Perligata, that allows to write programs using a syntax that is very similar to Latin. Are there programming languages that have less positional syntax? Are there other languages or modules that allow you to write in syntaxes inspired by other natural languages, like French, Hebrew or Farsi? There is a very long list on Wikipedia, but most of those projects are dead. There is a related question on StackOverflow. The answer that was accepted is "Use Google".

    Read the article

  • Visual Programming paradigms

    - by Rego
    As the number of "visual" OS's such as Android, iOS and the promised Windows 8 are becoming more popular, it does not seem to me that we programmers have new ways to code using these new technologies, due to a possible lack in new visual programming languages paradigms. I've seen several discussions about incompatibilities between the current coding development environment, and the new OS approaches from Windows 8, Android and other tablets OS's. I mean, today if we have a new tablet, it's almost a requirement for coding, to have, for instance, an external keyboard (due it seems to me it's very difficult to program using the touch screen), exactly because the coding assistance is not conceived to "write" thousands of lines of code. So, how advanced should be the "new" visual programming languages paradigms? Which characteristics these new paradigms would be required?

    Read the article

  • To maximize chances of functional programming employment

    - by Rob Agar
    Given that the future of programming is functional, at some point in the nearish future I want to be paid to code in a functional language, preferably Haskell. Assuming I have a firm grasp of the language, plus all the basic programmer attributes (good communication skills/sense of humour/hygiene etc), what should I concentrate on learning to maximize my chances? Are there any particularly sought after libraries I should know? Alternatively, would another language be a better bet, say F#? (I'm not too fussed about the kind of programming work, so long as it's reasonably interesting and reasonably well paid, and with nice people)

    Read the article

  • Design patterns and multiple programming language

    - by Eduard Florinescu
    I am referring here to the design patterns found in the GOF book. First how I see it, there are a few peculiarities to design pattern and knowing multiple language knowledge, for example in Java you really need a singleton but in Python you can do without it you write a module, I saw somewhere a wiki trying to write all GOF patterns for JavaScript and the entries where empty, I guess because it might be a daunting task. If there is someone who is using design patterns and is programming in multiple programming languages supporting the OOP paradigm and can give me a hint on how should I approach design patterns that might help me in all languages I use(Java, JavaScript, Python, Ruby): Can I write good application without knowing exactly the GOF design patterns or I might need some of them which might be crucial and if yes which one, are they alternatives to GOF for specific languages, and should a programmer or a team make its own design patterns set?

    Read the article

  • Pair programming business logic with a non-IT person

    - by user1598390
    Have you have any experience in which a non-IT person works with a programmer during the coding process? It's like pair programming, but one person is a non-IT person that knows a lot about the business, maybe a process engineer with math background who knows how things are calculated and can understand non-idiomatic, procedural code. I've found that some procedural, domain-specific languages like PL/SQL are quite understandable by non-IT engineers. These person end up being co-authors of the code and guarantee the correctness of formulas, factors etc. I've found this kind of pair programming quite productive, this kind of engineer user feel they are also "owners" and "authors" of the code and help minimize misunderstanding in the communication process. They even help design the test cases. Is this practice common ? Does it have a name ? Have you had similar experiences ?

    Read the article

  • Studies of Pair Programming on Translation Projects

    - by gmletzkojr
    I am looking for information (ie, studies, metrics, etc) for pair programming when translating a project from an "older" language to a "newer" language. In this particular case, translating means line for line translation where ever possible, and only modifying the design when absolutely necessary, not when the modification would provide improved performance. I have performed pair programming in new development, and I am well aware of the pros and cons of pairing in that environment. However, I haven't been able to find any information in this particular case. Any help is appreciated.

    Read the article

  • Is functional programming a superset of object oriented?

    - by Jimmy Hoffa
    The more functional programming I do, the more I feel like it adds an extra layer of abstraction that seems like how an onion's layer is- all encompassing of the previous layers. I don't know if this is true so going off the OOP principles I've worked with for years, can anyone explain how functional does or doesn't accurately depict any of them: Encapsulation, Abstraction, Inheritance, Polymorphism I think we can all say, yes it has encapsulation via tuples, or do tuples count technically as fact of "functional programming" or are they just a utility of the language? I know Haskell can meet the "interfaces" requirement, but again not certain if it's method is a fact of functional? I'm guessing that the fact that functors have a mathematical basis you could say those are a definite built in expectation of functional, perhaps? Please, detail how you think functional does or does not fulfill the 4 principles of OOP.

    Read the article

  • Should programming languages be strict or loose?

    - by Ralph
    In Python and JavaScript, semi-colons are optional. In PHP, quotes around array-keys are optional ($_GET[key] vs $_GET['key']), although if you omit them it will first look for a constant by that name. It also allows 2 different styles for blocks (colon, or brace delimited). I'm creating a programming language now, and I'm trying to decide how strict I should make it. There are a lot of cases where extra characters aren't really necessary and can be unambiguously interpreted due to priorities, but I'm wondering if I should still enforce them or not to encourage good programming habits. What do you think?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >