Search Results

Search found 7380 results on 296 pages for 'scripting languages'.

Page 81/296 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • Dynamics of the using keyword

    - by AngryHacker
    Consider the following code: // module level declaration Socket _client; void ProcessSocket() { _client = GetSocketFromSomewhere(); using (_client) { DoStuff(); // receive and send data Close(); } } void Close() { _client.Close(); _client = null; } Given that that the code calls the Close() method, which closes the _client socket and sets it to null, while still inside the `using' block, what exactly happens behind the scenes? Does the socket really get closed? Are there side effects? P.S. This is using C# 3.0 on the .NET MicroFramework, but I suppose the c#, the language, should function identically. The reason i am asking is that occasionally, very rarely, I run out of sockets (which is a very precious resource on a .NET MF devices).

    Read the article

  • Javascript comma operator

    - by Claudiu
    When combining assignment with comma (something that you shouldn't do, probably), how does javascript determine which value is assigned? Consider these two snippets: function nl(x) { document.write(x + "<br>"); } var i = 0; nl(i+=1, i+=1, i+=1, i+=1); nl(i); And: function nl(x) { document.write(x + "<br>"); } var i = 0; nl((i+=1, i+=1, i+=1, i+=1)); nl(i); The first outputs 1 4 while the second outputs 4 4 What are the parentheses doing here?

    Read the article

  • ByteStrings in Haskell

    - by Jon
    So i am trying to write a program that can read in a java class file as bytecode. For this i am using Data.Binary and Data.ByteStream. The problem i am having is because im pretty new to Haskell i am having trouble actually using these tools. module Main where import Data.Binary.Get import Data.Word import qualified Data.ByteString.Lazy as S getBinary :: Get Word8 getBinary = do a <- getWord8 return (a) main :: IO () main = do contents <- S.getContents print (getBinary contents) This is what i have come up with so far and i fear that its not really even on the right track. Although i know this question is very general i would appreciate some help with what i should be doing with the reading.

    Read the article

  • Is there a compiled* programming language with dynamic, maybe even weak typing?

    - by sub
    I wondered if there is a programming language which compiles to machine code/binary (not bytecode then executed by a VM, that's something completely different when considering typing) that features dynamic and/or weak typing, e.g: Think of a compiled language where: Variables don't need to be declared Variables can be created doing runtime Functions can return values of different types Questions: Is there such a programming language? (Why) not? I think that a dynamically yet strong typed, compiled language would really sense, but is it possible?

    Read the article

  • Language choice

    - by kzh
    For a starter of programming, there are a lot of programming language available to start with. Which should be the best choice for a starter to learn programming language?

    Read the article

  • What makes a bad programming language bad?

    - by sub
    We have all seen things like the typing system of JavaScript (There is a funny post including a truth table somewhere around here). I consider this one of the main things that makes a programming language bad. Other things that spring to mind: Bad Error messages (Either obfuscated so you can't figure out whats wrong, not existing or simply too long and red) The language wasn't planned and just grew uncontrolled in all directions (PHP?) The language encourages bad programm(er/ing) habits such as: Global variables everywhere, bad variable names Inconsistent naming conventions inside the language I can't come up with any more at the moment and would be very happy to read what you think about this. What shouldn't be missing in a language created to be as bad (from the perspectives of the programmer, the company that hires to programmer, the team leader and the customer) as possible? (I ask this because I'm designing a bad, experimental language at the moment)

    Read the article

  • How to force myself to follow naming and other conventions

    - by The King
    Hi All, I believe, I program good, atleast my code produces results... But I feel I have drawback... I hardly follow any naming conventions... neither for variables.. nor for methods... nor for classes... nor for tables, columns, SPs... Further to this, I hardly comment anything while programming... I always think that, Let me first see the results and then I will come and correct the var names and other things later... (Thanks to visual studio's reflection here)... But the later does not come... So, I need tips, to force myself to adopt to the practice of following naming conventions, and commenting... Thanks for your time

    Read the article

  • How do I evaluate my skillset against the current market to see what needs improvement and where my

    - by baijajusav
    First of all, this question may be out of bounds for this site. If so, remove it. I say this because this site seems to be a place for more concrete questions that are not so relative in nature. And before I begin, for those of you whom just prefer a question and not this sort of dialog, here is my question: How can I assess my current skills as a programmer and decide where and what areas to improve upon? That said, here's what I'm asking/talking about, in essence. The market is always in constant flux. As programmers we're always having to learn new things, update our skills, push ourselves into that next project. There's not a very good litmus test that I know of for us to get an idea of where we stand as programmers. I came across this blog post by Jeff Atwood talking about why can't programmers code. Instinctively (and as the post goes on to state) I rushed through the program in about 4 minutes (most of that time was b/c I was hand writing it out. Still, this doesn't really answer the question of where do my skills need to be to succeed in today's world. I real blogs, listen to podcasts, try to keep up on the latest things coming out. It has only been in the past couple of months that I made a decision to pick a focus area for my learning as I can't learn everything and trying to do so is to spread myself too thin. I chose ASP.NET MVC & C#. I plan to stick with Microsoft technologies, not out of some sense of loyalty or stubbornness, but rather because they seem to stream together and have a unifying connection between them. With Windows Phone 7 coming out, it seems that now is the obvious time to pick up WPF and Silverlight as well. Still, if you asked me to code something apart from intellisense and the internet, I probably couldn't get the syntax right. I don't have libraries memorized or know precisely where the classes I use exist within the .Net framework, namely because I haven't had to pull that knowledge out of the air. In a way, I suppose Visual Studio has insulated me, which isn't a good thing, but, at the same time, I've still been able to be productive. I'm working on my own side project to try and help my learning. In doing so, I'm trying to make use of best practices and 3rd party frameworks where I can. I'm using automapper and EF 1.0. I know everyone in the .net community seems to cry foul at the sound of EF 1.0, but I can't say why because I've never used it. There's no lazy loading and that has proven rather annoying; however, aside from that, I haven't had that much of an issue. Granted this is probably because I'm not writing tests as I go (which I'm not doing because I don't know how to test EF in tests and don't really have a clue how to write tests for ASP.NET MVC 1.0). I'm also using a custom membership provider; granted, it's a barebone implementation, but I'm using it still. My thinking in all of this is, while I am neglecting a great many important technologies that are in the mainstream, I'll have a working project in the end. I can come back and add those things after I finish. Doing it all now and at once seems like too much. I know how I work and I don't think I'd ever get it done that way. I've elected to make this a community wiki as I think this question might fight better there. If a moderator disagrees with that choice or the decision to post this here, the just delete the question. I'm not trying to make undue work for anyone. I'm just a programmer trying to assess my where his skills are now and where I should be improving.

    Read the article

  • How "healthy" is the haskell community

    - by Asher
    I came across a post where someone wrote something inaccurate about haskell (won't go into it) and he got flammed for it. Which (pleasantly) surprised me. About 3 years ago I read this joke about haskell: All the haskell programmers in the world can fit into a 747 and if that plane were to crash no one would care... or something along those lines. Which brings me to my question: is haskell "mainstream"? Is it mainly used by hobbiest and academics or someone making some serious money from it (which is the true yardstick of how good a language is - just kidding, geez!)?

    Read the article

  • Coding guidelines + Best Practices?

    - by Chathuranga Chandrasekara
    I couldn't find any question that directly applies to my query so I am posting this as a new question. If there is any existing discussion that may help me, please point it out and close the question. Question: I am going to do a presentation on C# coding guidelines but it is not supposed to limit to coding standards. So I have a rough idea but I think I need to address good programing practices. So the contents will be something like this. Basic coding standards - Casing, Formatting etc. Good practices - Usage of Hashset over other data structures, String vs String Builder, String's immutability and using them effectively etc Really I would like to add more good practices (Especially to improve the performance.) So like to hear some more good practices to be used with C#. Any suggestions??? (No need of large descriptions :) Just the idea is sufficient.)

    Read the article

  • What is the exact problem with multiple inheritance?

    - by Totophil
    I can see people asking all the time whether multiple inheritance should be included into the next version of C# or Java and C++ folks, who are fortunate enough to have this ability, say that this is like giving someone a rope to eventually hang themselves. What’s the matter with the multiple inheritance? Are there any concrete samples?

    Read the article

  • The Benefits of Constants

    - by onaclov2000
    I understand one of the big deals about constants is that you don't have to go through and update code where that constant is used all over the place. Thats great, but let's say you don't explicitly declare it as a constant. What benefit(s) exist(s) to take a variable that HAPPENS to actually not be changed and make it a constant, will this save on processing, and/or size of code...etc? Basically I have a program that the compiler is saying that a particular variable is not changed and thus can be declared a constant, I just wanted to know what the benefit to adding the constant qualifier to it would be, if it makes no difference then making that change adds no value and thus no point wasting time (this same scenario occurs in more then one place) going back and "fixing" all these variables. Thank you, onaclov

    Read the article

  • groovy variable function

    - by bsreekanth
    I'm not even sure about how to title this qn. But, hope there is an easy way to do it in dynamic language like groovy. say I have a class Service, where I delegate the business logic. the methods in it are funA(), funB()... funX(). Now I have a controller class, where I call the service closure, which can be invoked like service.funA() . Now based on a variable (which can have values A, B ... X), I need to cal the correct service closure. Basically to avoid writing lot of if conditional statements. Something like service."fun+var"() would do. I'm not sure whether it is possible to substitute variable in closure (function)name. or any way by passing function (name) as a parameter...not sure I think PHP has a similar feature http://php.net/manual/en/functions.variable-functions.php thanks for any pointer..

    Read the article

  • What is a good programming language for beginners? [closed]

    - by user122401
    Possible Duplicates: Best ways to teach a beginner to program? What is the easiest language to start with? What is a good programming language for beginners? I am 15 and had learned C++ before never got into it though? But is this like learning a new language? like having to do it over and over and every day having new stuff to learn ?

    Read the article

  • Programming Constructs History

    - by kunjaan
    I need some help in figuring out which language introduced the constructs that we use everyday. For example: Constructs Introduced from LISP If-Else Block :"The ubiquitous if-then-else structure, now taken for granted as an essential element of any programming language, was invented by McCarthy for use in Lisp, where it saw its first appearance in a more general form (the cond structure). It was inherited by Algol, which popularized it. " - WikiPedia Function Type : Functions as first class citizens. Garbage Collection

    Read the article

  • Coding guidelines + Best Practises?

    - by Chathuranga Chandrasekara
    I couldn't find any question that directly applies to my query so I am posting this as a new question. If there is any existing discussion that may help me, please point it out and close the question. Question: I am going to do a presentation on C# coding guidelines but it is not supposed to limit to coding standards. So I have a rough idea but I think I need to address good programing practices. So the contents will be something like this. Basic coding standards - Casing, Formatting etc. Good practices - Usage of Hashset over other data structures, String vs String Builder, String's immutability and using them effectively etc Really I would like to add more good practices (Especially to improve the performance.) So like to hear some more good practices to be used with C#. Any suggestions??? (No need of large descriptions :) Just the idea is sufficient.)

    Read the article

  • What is the easiest language to start with?

    - by Teifion
    What is the language with the lowest barriers to entry, simplest syntax, easiest setup. I'm aware that there's not a best language but I am sure that there will be one that's got a good score in all three areas. It's for teaching friends how to program, I like PHP and Python but I don't want to be narrow minded and limit myself when there is a better option out there. Common suggestions Ruby Python Basic C Java C# Useful links Best Ways To Teach A Beginner to Program Why's (Poignant) Guide to Ruby Think Python

    Read the article

  • How to simply this logic/code?

    - by Tattat
    I want to write an apps that accepts user command. The user command is used in this format: command -parameter For example, the app can have "Copy", "Paste", "Delete" command I am thinking the program should work like this : public static void main(String args[]){ if(args[0].equalsIgnoreCase("COPY")){ //handle the copy command } else if(args[0].equalsIgnoreCase("PASTE")){ //handle the copy command }/** code skipped **/ } So, it works, but I think it will become more and more complex when I have more command in my program, also, it is different to read. Any ideas to simply the logic?

    Read the article

  • how to use quad core CPU in application

    - by Mayank
    For using all the cores of a quad core processor what do I need to change in my code is it about adding support of multi threading or is it which is taken care by OS itself. I am having FreeBSD and language I am using is C++. I want to give complete CPU cycles to my application at least 90%.

    Read the article

  • Generics and Constrained Polymorphism versus Subtyping

    - by Rahul G
    Hullo all. In this (Warning: PDF) presentation on Haskell Type Classes, on slide #54, there's this question: Open Question: In a language with generics and constrained polymorphism, do you need subtyping too? My questions are: How do generics and constrained polymorphism make subtyping unnecessary? If generics and constrained polymorphism make subtyping unnecessary, why does Scala have subtyping?

    Read the article

  • scripts on Cshell

    - by lego69
    hello, I've got some problem, I have list of data in the file: 053-37878 03828008 Moskovitch James 500 052-34363 01234567 Mendelson Kippi 450 053-32322 03828008 Jameson Shula 350 054-39238 03333333 Merden Moshe 300 is it possible rewrite this list in the same file (without using temporary file) but without last number thanks in advance for any help (I'm talking about C-Shell scripts)

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >