Daily Archives

Articles indexed Thursday February 3 2011

Page 10/12 | < Previous Page | 6 7 8 9 10 11 12  | Next Page >

  • Methods of learning / teaching programming

    - by Mark Avenius
    When I was in school, I had a difficult time getting into programming because of a catch-22 in the learning process: I didn't know how to write anything because I didn't know what keywords and commands meant. For example (as a student, I would think), "what does this using namespace std; thing do anyway? I didn't know what keywords and commands meant because I hadn't written anything. This basically led me to spending countless long night cursing the compiler as I made minor tweaks to my assignments until they would compile (and hopefully perform whatever operation they were supposed to). Is there a teaching/learning method that anyone uses that gets around this catch-22? I am trying to make this non-argumentative, which is why I don't want to know the 'best' method, but rather which methods exist.

    Read the article

  • Is code maintenance typically a special project, or is it considered part of daily work?

    - by blueberryfields
    Earlier, I asked to find out which tools are commonly used to monitor methods and code bases, to find out whether the methods have been getting too long. Most of the responses there suggested that, beyond maintenance on the method currently being edited, programmers don't, in general, keep an eye on the rest of the code base. So I thought I'd ask the question in general: Is code maintenance, in general, considered part of your daily work? Do you find that you're spending at least some of your time cleaning up, refactoring, rewriting code in the code base, to improve it, as part of your other assigned work? Is it expected of you/do you expect it of your teammates? Or is it more common to find that cleanup, refactoring, and general maintenance on the codebase as a whole, occurs in bursts (for example, mostly as part of code reviews, or as part of refactoring/cleaning up projects)?

    Read the article

  • What tools do you use to let you know that methods in your codebase are getting too long?

    - by blueberryfields
    Most people seem to agree that long methods are a code smell - a sign something may not be quite right with the code contained in them. Which tools do you use to detect this smell? clarified title based on responses. also, remember: Your code will live over time, and be edited by multiple programmers Emergency fixes and changes will come in, late at night, when the writer is too tired to pay attention to smells Different programmers use different tools. A contractor with 4 screens set at maximum resolution will have a different idea of acceptable method size In this context, I'm looking for tools and methods which go beyond looking at the size of a method when it's written, or when it's being edited.

    Read the article

  • How to structure a project that supports multiple versions of a service?

    - by Nick Canzoneri
    I'm hoping for some tips on creating a project (ASP.NET MVC, but I guess it doesn't really matter) against multiples versions of a service (in this case, actually multiple sets of WCF services). Right now, the web app uses only some of the services, but the eventual goal would be to use the features of all of the services. The code used to implement a service feature would likely be very similar between versions in most cases (but, of course, everything varies). So, how would you structure a project like this? Separate source control branches for each different version? Kind of shying away from this because I don't feel like branch merging should be something that we're going to be doing really often. Different project/solution files in the same branch? Could link the same shared projects easily Build some type of abstraction layer on top of the services, so that no matter what service is being used, it is the same to the web application?

    Read the article

  • PHP usage outside the web?

    - by Anto
    As you probably are aware, PHP is not only usable for web programming, but also desktop programming. It even has things such as GTK bindings. Do you have any examples of places where PHP is actually used outside web programming for anything more than just very trivial programs? Do you know of any desktop program which uses PHP to some extent (e.g. as Python could be used in a C program)? Note: I don't program in PHP myself, I'm just curious

    Read the article

  • Is "as long as it works" the norm?

    - by q303
    Hi, My last shop did not have a process. Agile essentially meant they did not have a plan at all about how to develop or manage their projects. It meant "hey, here's a ton of work. Go do it in two weeks. We're fast paced and agile." They released stuff that they knew had problems. They didn't care how things were written. There were no code reviews--despite there being several developers. They released software they knew to be buggy. At my previous job, people had the attitude as long as it works, it's fine. When I asked for a rewrite of some code I had written while we were essentially exploring the spec, they denied it. I wanted to rewrite the code because code was repeated in multiple places, there was no encapsulation and it took people a long time to make changes to it. So essentially, my impression is this: programming boils down to the following: Reading some book about the latest tool/technology Throwing code together based on this, avoiding writing any individual code because the company doesn't want to "maintain custom code" Showing it and moving on to the next thing, "as long as it works." I've always told myself that next job I'm going to get a better shop. It never happens. If this is it, then I feel stuck. The technologies always change; if the only professional development here is reading the latest MS Press technology book, then what have you built in 10 years but a superficial knowledge of various technologies? I'm concerned about: Best way to have professional standards How to develop meaningful knowledge and experience in this situation

    Read the article

  • What are the so-called "levels" of understanding multithreading?

    - by Dan Tao
    I seem to remember reading somewhere some list of 4 "levels" of understanding multithreading. This may have been in a formal publication, or it may have been in an extremely informal context (even like in a Stack Overflow question, for example). Unfortunately I don't remember who referred to them or precisely what they were. I seem to recall that they were roughly like: Total ignorance Awareness mixed with incompetence Relative competence mixed with fear True understanding My intention is to refer to these levels in a blog post I'm writing, with a reference; but I can't for the life of me remember where I first encountered this list. Brief Google searches have proved unfruitful.

    Read the article

  • Transitioning from a mechanical engineer to software developer. What path to take?

    - by Patrick
    Hi all, I am 24 years old and have a BS in mechanical engineering from Mizzou. I have been working as a mechanical engineer in a big corporation for about 2 years since graduation. In this time, I have decided that I'm just not that interested in mechanical engineering topics, and I'm much more excited about web technology, website design, etc. I do a very small amount of freelance web design just to get experience, but I have no formal training yet. Ultimately I could see myself being very excited about working for a small startup in web technology, or creating and selling my own programs in more of an entrepreneurial role. What path do you recommend for transitioning into this field? Go back to school and get a BS in CS? MS in CS? Tech school for classes? Self study? I'm feeling overwhelmed by the options available, but the one thing I know for sure is that I'm excited to make a change. Thanks!

    Read the article

  • How to stay creative when going through tough emotional times (divorce, family death, etc)? [closed]

    - by gaearon
    Hi everyone. I believe this is not a duplicate of motivation question because I want to especially emphasize the emotional breakdown. You may conquer lack of motivation by working harder and getting through the dip, however this was not the case when I was separating with my girlfriend. I actually liked the project, it was (and it still is!) my first programming job at an amazing workplace and I wasn't being pressured in any way but I found myself absolutely unable to code, blankly staring at the screen, my thoughts disorganized, the feeling of emptiness all in my chest. I could perform some straightforward coding but anything that involves creative thinking, designing abstractions, solving new problems and, worst of all, fixing bugs in legacy code, completely wiped out my brain to the point I started avoiding work, which I never have done before. Coffee only used to make it worse. Eventually I got over that, and I remember the happy day I solved a problem elegantly and thought—hell, first time in a month! Thankfully the project wasn't top priority and I had the time to catch up. I wonder now, was there any other way to boost my productivity back then? I bet people would say I should've taken a break—and I think I really should have—but what if I needed the money? Didn't want to lose my job? Are there any ways to trick your brain into being creative despite emotional losses? From your experience, would it be worth talking to my boss, collegues?

    Read the article

  • Do you leverage the benefits of the open-closed principle?

    - by Kaleb Pederson
    The open-closed principle (OCP) states that an object should be open for extension but closed for modification. I believe I understand it and use it in conjunction with SRP to create classes that do only one thing. And, I try to create many small methods that make it possible to extract out all the behavior controls into methods that may be extended or overridden in some subclass. Thus, I end up with classes that have many extension points, be it through: dependency injection and composition, events, delegation, etc. Consider the following a simple, extendable class: class PaycheckCalculator { // ... protected decimal GetOvertimeFactor() { return 2.0M; } } Now say, for example, that the OvertimeFactor changes to 1.5. Since the above class was designed to be extended, I can easily subclass and return a different OvertimeFactor. But... despite the class being designed for extension and adhering to OCP, I'll modify the single method in question, rather than subclassing and overridding the method in question and then re-wiring my objects in my IoC container. As a result I've violated part of what OCP attempts to accomplish. It feels like I'm just being lazy because the above is a bit easier. Am I misunderstanding OCP? Should I really be doing something different? Do you leverage the benefits of OCP differently? Update: based on the answers it looks like this contrived example is a poor one for a number of different reasons. The main intent of the example was to demonstrate that the class was designed to be extended by providing methods that when overridden would alter the behavior of public methods without the need for changing internal or private code. Still, I definitely misunderstood OCP.

    Read the article

  • Mythbusters- Programming/hacking myths [closed]

    - by stephen776
    Hey guys. I am a big fan of the Discovery show Mythbusters, as Im sure some of you are as well. I have always wanted them to do an episode on programming/hacking. They get a lot of their show ideas from fans so I though we could compile a list of possible myths to bust. Lets hear your ideas! (sorry if this is not appropriate, close if necessary) Edit: I am not necessarily looking for subjective "This is what I want to see" answers. I am talking more along the lines of interesting computer/programming/hacking stories that would appeal to a general audience. I do not expect them to do a show on "Whats faster i++ or i + 1".

    Read the article

  • Unit testing code paths

    - by Michael
    When unit testing using expectations, you define a set of method calls and corresponding results for those calls. These define the path through the method that you want to test. I have read that unit tests should not duplicate the code. But when you define these expectations, isn't that duplicating the code, or at least the process? How do you know when you're duplicating functionality under test?

    Read the article

  • Need help fixing a strange path error in bash

    - by Evan
    UPDATE Ok, I found some errors in the path which I think I fixed, but now it's not running in any case - which for some reason I think is a step forward. Thanks for suggesting the following steps, here is their output: user@computer:~$ echo $PATH /usr/share/fsl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/matlab/bin:/usr/local/VoxBo/bin:/usr/local/itt/idl64/bin:/usr/local/afni/bin/:/usr/local/mricron:/usr/lib/voxbo/bin:/home/user/folder:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11/:/usr/games/:/usr/local/matlab/bin:/usr/local/VoxBo/bin/:/usr/local/itt/idl64/bin:/usr/local/afni/bin/:/usr/local/mricron/ user@computer:~$ typeset -p PATH declare -x PATH="/usr/share/fsl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/matlab/bin:/usr/local/VoxBo/bin:/usr/local/itt/idl64/bin:/usr/local/afni/bin/:/usr/local/mricron:/usr/lib/voxbo/bin:/home/user/folder:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11/:/usr/games/:/usr/local/matlab/bin:/usr/local/VoxBo/bin/:/usr/local/itt/idl64/bin:/usr/local/afni/bin/:/usr/local/mricron/" user@computer:~$ type app1 app1 is /home/user/folder/app1 user@computer:~$ type app2 app2 is /home/user/folder/app2 user@computer:~$ app1 bash: /home/user/folder/app1: No such file or directory user@computer:~$ app2 bash: /home/user/folder/app2: No such file or directory user@computer:~$ /home/user/folder/app1 bash: /home/user/folder/app1: No such file or directory user@computer:~$ /home/user/folder/app2 bash: /home/user/folder/app2: No such file or directory user@computer:~$ cd /home/user/folder user@computer:~/folder$ app1 bash: /home/user/folder/app1: No such file or directory user@computer:~/folder$ ./app1 bash: ./app1: No such file or directory user@computer:~/folder$ ./app2 bash: ./app2: No such file or directory user@computer:~/folder$ ls -l total 29384 -rwxr-xr-x 1 user user 14949776 2011-02-03 11:09 app1 -rwxr-xr-x 1 user user 15137300 2011-02-03 11:10 app2 user@computer:~/folder$ Thanks for everyone's input! ORIGINAL QUESTION I have two executable files I downloaded and am trying to add to the path. They are located in /home/user/folder and the specific files are /home/user/folder/app1 /home/user/folder/app2 Both app1 and app2 have the executable flag set to all (user, group, other). I can execute the files if I am in /home/user/folder and I execute these commands ./app1 ./app2 However I can't run them from elsewhere. I added this line to my .profile PATH="$PATH:/home/user/folder" and then sourced the path with . /home/user/.profile and I can see app1 and app2 when I use command completion (pressing tab). However here is what happens when I try to run app1 or app2 with the following commands (the following only shows 'app1' but the same is true of 'app2') user@comp:~$ app1 -bash: app1: command not found user@comp:~$ /home/user/folder/app1 -bash: app1: command not found user@comp:~/folder$ ./app1 (program runs) I'm stumped :), I must have missed something simple. Thanks for your help!!

    Read the article

  • Overwrite previous output in Bash instead of appending it

    - by NES
    For a bash timer i use this code: #!/bin/bash sek=60 echo "60 Seconds Wait!" echo -n "One Moment please " while [ $sek -ge 1 ] do echo -n "$sek " sleep 1 sek=$[$sek-1] done echo echo "ready!" That gives me something like that One Moment please: 60 59 58 57 56 55 ... Is there a possibility to replace the last value of second by the most recent so that the output doesn't generate a large trail but the seconds countdown like a real time at one position? (Hope you understand what i mean :))

    Read the article

  • Partitions for dual boot install with Windows

    - by Tim
    Following is the layout of the current partitions of my single hard drive viewed from Windows 7: C: has Windows 7 system files and my personal data; Q: for Lenovo recovery; SYSTEM_DRV: for Windows boot files; My goals are: to create another partition D: for my personal data, and dedicate C: for Windows system files and applications only. to install Ubuntu alongside Windows. D: will be shared between the two OSes. My questions are: Is it correct that the free space generated from shrinking C: will only be able to create an extended partition, since there are already 3 primary partitions? So must D: be one logical partition on the extended partition, just as the partitions for Ubuntu will be? Will this be bad sometime? If yes, other better solutions? What are the good utilities to accomplish the partition tasks? Can Ubuntu installer solely handle them? Or better to have some of the jobs done in Windows with some recommended softwares? Thanks and regards!

    Read the article

  • How to use IBM T42 laptop's built-in Bluetooth?

    - by B. Roland
    Hello! I have an IBM ThinkPad T42 laptop, and I have some troubles with built-in bluetooth, because in Hardware Drivers, there are no drivers for it, and in Bluetooth settings, it shows, that it has no BT devices. If I plug in an USB Bluetooth adapter, I can use easily Wammu for my mobile backup. I have no setting in BIOS, to enable, or disable it(if disable wireless refers to Wi-fi, but it is enabled too). Some outputs, what the community asked from me, in the IRC: $ sudo hcitool dev Devices: $ $ cat /proc/acpi/ibm/bluetooth No file or dir $ $ sudo modprobe bluetooth $ $ rfkill list 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no $ But they couldn't solve my problems. What can I do?

    Read the article

  • Flashing screen hovering over menubar on left side

    - by iwekb
    Just installed Ubuntu 10.10 netbook version on an older Dell Laptop (no other operating system installed). When hovering with mouse over menu bar, the full screen changes to default coloured back ground shortly and then back to normal (as after start-up) again. And that each time the mouse is over any of the (default) icons on the menu bar. I am not able to select any icon. No left or right click works on icons or anywhere on the menubar apart from the left top small icon, white Ubuntu logo, and the right top small icons for WiFi, sound, mail, shut-down etc. Those icons work. I tried re-installation again and all patches are downloaded. Same problem. Problem is that I can't enter commands either to reduce e.g. the swappiness (if that would be of any help). Can somebody help me that encountered similar problem or knows a resolution?

    Read the article

  • How do you reset a USB device from the command line?

    - by Casey
    Is it possible to reset the connection of a USB device, without physically disconnecting/connecting from the PC? Specifically, my device is a digital camera. I'm using gphoto2, but lately I get "device read errors", so I'd like to try to do a software-reset of the connection. From what I can tell, there are no kernel modules being loaded for the camera. The only one that looks related is usbhid.

    Read the article

  • How to make Google SketchUp work with Intel graphics in Wine?

    - by haltman
    Hi, everybody! My pc has an Intel DH57JG mainboard, I've installed wine, launching sketchup I receive error that I don't have OpenGL installed, is there a way to configure/install it? On my previous pc with an NVidia video card installing official NVidia driver resolved it. Is there is a way to do the same with the Intel card? Running locate libgl on a terminal returns no results. thanks in advance.

    Read the article

  • What is the best solution for document archiving?

    - by Anders Wallenquist
    I'm looking for a utility that helps me (and my colleagues) to archive documents in a systematic manner (Like Zeitgeist but permanent). The utility have to clean-out old document from desktops and store them on a server (as automatic as possible and consistent) maybe from just a few locations (Document directory) Documents shall be stored on cheap large media for many years to come - hard disk and file system maybe? Easy to maintain and manage for a small organization. Documents have to be easy to find and restore One systematic manner could be a directory-structure by year, month, user or user, year, month. Its a plus if documents could be linked to a project, if documents could be search-able and if document could also be mail, IM-discussions not only OpenOffice traditional documents. Any ideas?

    Read the article

  • How to see what's going on during shutdown

    - by Huygens
    Since a few weeks, Ubuntu freezes almost everytime when I shut it down. I know it because the shutdown animation stops and nothing is responsive: Ctrl+Alt+Del or AltGr+Syst+[r,e,i,s,u,b] don't make any difference. I have tried to look at various log files in /var/log but only INFO level message are logged. My hope to solve this problem would be to do a verbose shutdown, one where I could see what's going on, and so what's causing the problem, so I could start solving it. Therefore, as the title suggest it. Is there a way to see what's going on during shutdown? I could even go to the extreme of doing a step-by-step shutdown if this is the only way. Thanks for any tips.

    Read the article

  • Recommendations for managing DNS issues when hosting customer sites.

    - by Thomas
    I'm working at a company which primarily provides SaaS products but also will host some of our customers corporate websites. My question relates to recommendations for managing DNS for client's domain names. My objectives: Not restrict my ability to change the server's IP address such as might happen when I move my servers to a new host. Not have to contact the customer to change their domain's DNS if I need to change the server's IP address. Often times, customers lose this information or have to track down the one person with any knowledge of the domain settings. Map both .clientdomain.com and www.clientdomain.com to the proper IIS site. However, I'm running into a couple of common problems: Sometimes, the DNS console provided by the client's hosting company does not allow for CNAME records. Sometimes, the DNS console provided by the client's hosting company will not let me create a CNAME entry for .spiffydomain.com because the given hosting company has created a SOA record for that entry or simply requires that .spiffydomain.com be an A record. I believe one solution to #2 is to use a wildcard for a CNAME entry (i.e. *.spiffydomain.com). Is that correct? How do other folks that are hosting many customer's site manage change of DNS entries on their servers?

    Read the article

  • Is your IP address neighborhood important for SEO?

    - by Evgeny
    Can other websites on your shared host affect the rank of your website in the Google index? (same IP address as yours, potentially malicious/low-trust content) Can other websites on your IP class affect the rank of your website in the Google index? (different actual IP, malicious/low-trust content) Clarification: Domain class, is what you get when you run a whois query on an IP address. Example: NetRange: 69.163.128.0 - 69.163.255.255 CIDR: 69.163.128.0/17 PS: Prefer answers with experience or links to trustworthy material, over speculations, assumptions and gut feelings.

    Read the article

  • DNS Configuration when registrar and host are two different companies

    - by dclowd9901
    I'm a total noob when it comes to DNS configuration. My client bought a domain through one company and is hosting their site with another (a virtual dedicated server). I can't find anything on the web that explains one's way through this setup. Where do I start? Which nameservers do I use? Which company's zone files do I edit? Basically it boils down, for me that I don't understand which company takes the lead, and which piggybacks off their configuration. Thanks in advance for the help.

    Read the article

  • Can I import an existing member data used in old ASP to a new ASP.NET membership database? [closed]

    - by Rick Brown
    I have an old website that I designed and still maintain using old ASP that has a membership database (MS-SQL) that I built from scratch. It is a very simple database that has all the user information in one table (including login info and personal info) and then details and other odds and ends in other tables. It is WAY past time to upgrade this to .NET, especially since I need to add a Paypal payment system into it as soon as I can. I've designed several other sites with membership in .NET, but they have all been from scratch. Is there an easy way to transition from the old ASP site to a new .NET membership database without losing the data? There are hundreds of users with thousands of records relating to those users that I'd rather not lose, if possible. Any ideas on a relatively painless way to do this?

    Read the article

< Previous Page | 6 7 8 9 10 11 12  | Next Page >