Search Results

Search found 38 results on 2 pages for 'ocd'.

Page 1/2 | 1 2  | Next Page >

  • Programmatically execute vim commands?

    - by Ben Gartner
    I'm interested in setting up a TDD environment for developing Vim scripts and rc files. As a simple example, say I want to have vim insert 8 spaces when I press the tab key. I would set up a script that did the following: Launch vim using a sandboxed .vimrc file press i press tab press esc press :w test_out assert that test_out contains ' ' by the default config in vim, this would fail. However, once I add set expandtab to my .vimrc file, the test will pass. So the question is, how do I programmatically issue these commands? 'vim -c ' is close, but seems to only work for ex mode commands. Any suggestions? This question seem to be thoroughly google-proof.

    Read the article

  • wrong SEO result for staging website

    - by OCD
    Hi, We have a domain with URL, lets say: http://www.xxxxstaging.com/abc.php?id=10 which is having a pretty good ranking for some keywords in google. However, this is our staging website and due to some historical reason, it was exposed to public. Now we have a production domain (the one we want to be publicly available), say: http://www.xxxxproduction.com/abc.php?id=10 which have exactly the same html output as xxxxstaging.com our question is, for the exactly same keyword search, it never appear in any page of google. Is it possible for us to "switch" the ranking in google, either tell the robot that they are indeed the same website, or tell google to change it for us? Thank you.

    Read the article

  • Reinventing the Wheel, why should I?

    - by Mercfh
    So I have this problem, it may be my OCD (i have OCD it's not severe.....but It makes me very..lets say specific about certain things, programming being one of them) or it may be the fact that I graduated college and still feel "meh" at programming. Reading This made me think "OH thats me!" but thats not really my main problem. My big problem is....anytime im using a high level language/API/etc. I always think to myself that im not really "programming". I know I know...it sounds stupid. But Like I feel like....if i can't figure out how to do it at the lowest level then Im not really "understanding" it. I do this for just about every new technology I learn. I look at the lowest level and try to understand it. Sometimes I do.....most of the time I don't, I mean i've only really been programming for 4 years (at college, if you even call it programming.....our university's program was "meh"). For instance I do a little bit of embedded programming (with the Atmel AVR 8bits/Arduino stuff). And I can't bring myself to use the C compiler, even though it's 8 million times easier than using assembly......it's stupid I know... Anyone else feel like this, I think it's just my OCD that makes me feel this way....but has anyone else ever felt like they need to go down to the lowest level of the language to even be satisfied with using it? I apologize for the very very odd question, but I think it really hinders me in getting deep seeded into a programming language and making a real application of my own. (it's silly I know)

    Read the article

  • increasing amazon root volume size

    - by OCD
    I have a default amazon ec2 instance with 8GB root volume size. I am running out of space. I have: Detach the current EBS volume in AWS Management Console (Web). Create snapshot of this volume. Created a new Volume with 50G space with my snapshot. Attach the new volume back to the instance to /dev/sda1 However, when I reconnect to the account with: > df -h I can see from the management console that my new Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 8256952 8173624 0 100% / tmpfs 308508 40 308468 1% /dev/shm It's still not using my new volume's size, how to make this work?

    Read the article

  • How do I format my entire HDD?

    - by Hjke123
    Ok I have recently made some mistakes with installing some operating systems that I should have just kept on a live cd not ubuntu but another os and with my ocd when I saw my lot's of different partitions I just wanted to reset my computer so it boot's up and doesn't load any os and I have to put in my ubuntu live cd and install that and that would be my only os on this computer so I want to know how I can just wipe my entire hard drive so when it boot's I get to put my live cd in and start anew?

    Read the article

  • Create a Remote Git Repository from an Existing XCode Repository

    - by codeWithoutFear
    Introduction Distributed version control systems (VCS’s), like Git, provide a rich set of features for managing source code.  Many development tools, including XCode, provide built-in support for various VCS’s.  These tools provide simple configuration with limited customization to get you up and running quickly while still providing the safety net of basic version control. I hate losing (and re-doing) work.  I have OCD when it comes to saving and versioning source code.  Save early, save often, and commit to the VCS often.  I also hate merging code.  Smaller and more frequent commits enable me to minimize merge time and effort as well. The work flow I prefer even for personal exploratory projects is: Make small local changes to the codebase to create an incrementally improved (and working) system. Commit these changes to the local repository.  Local repositories are quick to access, function even while offline, and provides the confidence to continue making bold changes to the system.  After all, I can easily recover to a recent working state. Repeat 1 & 2 until the codebase contains “significant” functionality and I have connectivity to the remote repository. Push the accumulated changes to the remote repository.  The smaller the change set, the less likely extensive merging will be required.  Smaller is better, IMHO. The remote repository typically has a greater degree of fault tolerance and active management dedicated to it.  This can be as simple as a network share that is backed up nightly or as complex as dedicated hardware with specialized server-side processing and significant administrative monitoring. XCode’s out-of-the-box Git integration enables steps 1 and 2 above.  Time Machine backups of the local repository add an additional degree of fault tolerance, but do not support collaboration or take advantage of managed infrastructure such as on-premises or cloud-based storage. Creating a Remote Repository These are the steps I use to enable the full workflow identified above.  For simplicity the “remote” repository is created on the local file system.  This location could easily be on a mounted network volume. Create a Test Project My project is called HelloGit and is located at /Users/Don/Dev/HelloGit.  Be sure to commit all outstanding changes.  XCode always leaves a single changed file for me after the project is created and the initial commit is submitted. Clone the Local Repository We want to clone the XCode-created Git repository to the location where the remote repository will reside.  In this case it will be /Users/Don/Dev/RemoteHelloGit. Open the Terminal application. Clone the local repository to the remote repository location: git clone /Users/Don/Dev/HelloGit /Users/Don/Dev/RemoteHelloGit Convert the Remote Repository to a Bare Repository The remote repository only needs to contain the Git database.  It does not need a checked out branch or local files. Go to the remote repository folder: cd /Users/Don/Dev/RemoteHelloGit Indicate the repository is “bare”: git config --bool core.bare true Remove files, leaving the .git folder: rm -R * Remove the “origin” remote: git remote rm origin Configure the Local Repository The local repository should reference the remote repository.  The remote name “origin” is used by convention to indicate the originating repository.  This is set automatically when a repository is cloned.  We will use the “origin” name here to reflect that relationship. Go to the local repository folder: cd /Users/Don/Dev/HelloGit Add the remote: git remote add origin /Users/Don/Dev/RemoteHelloGit Test Connectivity Any changes made to the local Git repository can be pushed to the remote repository subject to the merging rules Git enforces. Create a new local file: date > date.txt /li> Add the new file to the local index: git add date.txt Commit the change to the local repository: git commit -m "New file: date.txt" Push the change to the remote repository: git push origin master Now you can save, commit, and push/pull to your OCD hearts’ content! Code without fear! --Don

    Read the article

  • How to correctly remove OpenJDK and JRE and set the system use only and only Sun JDK and JRE?

    - by Ivan
    Ubuntu seems to favour OpenJDK/JRE very much over Sun JDK/JRE. Even after I installed Sun JRE, JDK and plugin and spent some time plucking out OpenJDK-related packages, apt-get has installed them back with some packages as a dependency. Can this behaviour be corrected in favour of Sun Java packages? I'd like to have one and only Java stack installed (yes, it's a bit of OCD, but I like to have my systems clean) and want it to be Sun Java. Update: as Marcos Roriz notes, the problem seems to be in default-jre (on which Java-dependent packages use to depend) pointing to OpenJDK, so the question seems to go about how to hack default-jre/default-jdk to point to Sun Java.

    Read the article

  • Is it bad to have an "Obsessive Refactoring Disorder"?

    - by Rachel
    I was reading this question and realized that could almost be me. I am fairly OCD about refactoring someone else's code when I see that I can improve it. For example, if the code contains duplicate methods to do the same thing with nothing more than a single parameter changing, I feel I have to remove all the copy/paste methods and replace it with one generic one. Is this bad? Should I try and stop? I try not to refactor unless I can actually make improvements to the code performance or readability, or if the person who did the code isn't following our standard naming conventions (I hate expecting a variable to be local because of the naming standard, only to discover it is a global variable which has been incorrectly named)

    Read the article

  • How to Store the Contents of Your Office ‘Zip File’ Style [Humorous Image]

    - by Asian Angel
    There is plenty of room for that new computer you were wanting, but you had better hope that you do not need an item from the bottom of the stack moments from now… You can view more organizational wonderment and visit Michael’s website using the links below… OMG – OCD (Image Collection) Visit the Artist’s Website – Michael Johansson [via MUO] 6 Start Menu Replacements for Windows 8 What Is the Purpose of the “Do Not Cover This Hole” Hole on Hard Drives? How To Log Into The Desktop, Add a Start Menu, and Disable Hot Corners in Windows 8

    Read the article

  • Is it worth being computer languages polyglot?

    - by Anton Barkowski
    You can often hear that programmers should learn many different languages to improve themselves. I still go to school and don't have big programming experience (a little more than year). But what was noble intention to improve programming skills turned into some kind of OCD: I feel that I won't calm down until I learn all relatively known programming languages. And here is question itself: Will being programming languages polyglot actually help you (And I don't mean usual "Programmer should know at least all paradigms", I mean really all languages you usually hear about)? Does anybody have similar experience? Does it help with job/skills/career? How often are you able to apply those skills?

    Read the article

  • Is it bad to have an "Obsessive Refactoring Disorder"?

    - by Rachel
    I was reading this question and realized that could almost be me. I am fairly OCD about refactoring someone else's code when I see that I can improve it. For example, if the code contains duplicate methods to do the same thing with nothing more than a single parameter changing, I feel I have to remove all the copy/paste methods and replace it with one generic one. Is this bad? Should I try and stop? I try not to refactor unless I can actually make improvements to the code performance or readability, or if the person who did the code isn't following our standard naming conventions (I hate expecting a variable to be local because of the naming standard, only to discover it is a global variable which has been incorrectly named)

    Read the article

  • How do you cope with ugly code that you wrote?

    - by Ralph
    So your client asks you to write some code, so you do. He then changes the specs on you, as expected, and you diligently implement his new features like a good little lad. Except... the new features kind of conflict with the old features, so now your code is a mess. You really want to go back and fix it, but he keeps requesting new things and every time you finish cleaning something, it winds up a mess again. What do you do? Stop being an OCD maniac and just accept that your code is going to wind up a mess no matter what you do, and just keep tacking on features to this monstrosity? Save the cleaning for version 2?

    Read the article

  • Elegant ways to handle if(if else) else

    - by Benjol
    This is a minor niggle, but every time I have to code something like this, the repetition bothers me, but I'm not sure that any of the solutions aren't worse. if(FileExists(file)) { contents = OpenFile(file); // <-- prevents inclusion in if if(SomeTest(contents)) { DoSomething(contents); } else { DefaultAction(); } } else { DefaultAction(); } Is there a name for this kind of logic? Am I a tad too OCD? I'm open to evil code suggestions, if only for curiosity's sake...

    Read the article

  • The evils of #region

    - by DarrenFieldhouse
    I’m not a big fan of #region, I use it occasionally but generally try to avoid it. It’s always frustrating to open a code file and be presented with nothing but collapsed regions – sure, it looks neat (and lets face, more than a few programmers are a little OCD) but I want to see the code, that’s why I opened the file in the first place! Don’t worry, I’m not going off on a rant, I just want to direct you to a much more level headed explanation of The Problem With Code Folding. I couldn’t agree more.

    Read the article

  • Is there any benefit to obsession with making code "look pretty"?

    - by TaylorOtwell
    Sometimes I spend ridiculous amounts of time (hours) agonizing over making code "look pretty". I mean making things look symmetrical. I will actually rapidly scroll through an entire class to see if anything jumps out as not looking "pretty" or "clean". Am I wasting my time? Is there any value in this kind of behavior? Sometimes the functionality or design of the code won't even change, I'll just re-structure it so it looks nicer. Am I just being totally OCD or is there some benefit hidden in this?

    Read the article

  • No startup sound

    - by Laci Bacsi
    Despite numerous attempt, and advise, this is what I applied. sudo cp /usr/share/sounds/ubuntu/stereo/* /usr/share/sounds/ Type this: cd /dev ls -l |less find 14, [0-...] This file for audio you can type cat /etc/passwc >/dev/dsp dsp if speaker device This is not a big deal but I'm an OCD person, so I would like that it works. An other issue is the screensaver, I can not watch movies. I understand that Ubuntu default settings are "Turned off start up sound, and 10 min screensaver auto" If I would be allowed to a suggestions, it is the followings: Is that so problematic to create a check box to check or un check this futures, just to be able to enjoy your product fully? Furthermore I'm reading a lot of similar issues on blogs... Annoying

    Read the article

  • What causes memory fragmentation in .NET

    - by Matt
    I am using Red Gates ANTS memory profiler to debug a memory leak. It keeps warning me that: Memory Fragmentation may be causing .NET to reserver too much free memory. or Memory Fragmentation is affecting the size of the largest object that can be allocated Because I have OCD, this problem must be resolved. What are some standard coding practices that help avoid memory fragmentation. Can you defragment it through some .NET methods? Would it even help?

    Read the article

  • SEO and dynamic javascript HTML switching

    - by Gazow
    just wondering if anyone knows anything of using javascript to set html to new content instead of linking to new pages, if this is generally a bad idea or if it kind of hurts SEO(which im kind of new to) Basically the home page displays given content, and the links to like contact pages and stuff, just change the body content to what would normally be a separate html page. my OCD kinda bugs me when pages reload and either flash the background or its offset somehow, so i wanted to know if making sites like this was a bad idea or whatever- i suppose at the least, i could create duplicates/hidden pages for SEO purposes

    Read the article

  • Black stripe appears to the right of the screen, impossible to get rid of

    - by Gabriele Cirulli
    After clicking the "Auto Config" button on my Acer AL2216w screen a stripe appeared on the right of the screen where the screen doesn't "exist" and I can't seem to take the screen viewport back even by using the OCD setting and moving it to the right. The left part of the screen is also hidden and I'm not able to see what's going on there. The PC is connected to the screen through a DVI adapter and a VGA cable. I also use multiple monitors and this is the second monitor. Anyway this seems not to be a related issue, as this used to happen even when I only had a single monitor. I managed to fix this issue once but it was more than two years ago and I can't remember what I did, and out of all of the things I've tried so far (connecting the screen to another PC and performing auto adjustment, switching the cables, etc.) none worked. Here's how it looks: Can anyone help me fix this?

    Read the article

  • Windows command line built-in compression/decompression tool?

    - by Will Marcouiller
    I need to write a batch file to unzip files to their current folder from a given root folder. Folder 0 |----- Folder 1 | |----- File1.zip | |----- File2.zip | |----- File3.zip | |----- Folder 2 | |----- File4.zip | |----- Folder 3 |----- File5.zip |----- FileN.zip So, I wish that my batch file is launched like so: ocd.bat /d="Folder 0" Then, make it iterate from within the batch file through all of the subfolders to unzip the files exactly where the .zip files are located. So here's my question: Does the Windows (from XP at least) have a command line for its embedded zip tool? Otherwise, shall I stick to another third-party util?

    Read the article

  • Change user login in Windows 7 (after a misprint in username)

    - by Artem Russakovskii
    I have an install of Windows 7 that I've already put a few days into. Today I realized I've made a mistake in the username and it's driving me nuts (my personal OCD). While changing the physical folder name is perhaps possible, though quite involved, I do not want to open that can of worms. What I want to do is simply change the username I give when the login prompt shows up. I thought it's possible by just renaming the user account in the User Accounts but that didn't work. Is it possible to do then? Or is the only way to create another user and spend hour migrating everything I'd already customized to that user?

    Read the article

  • Windows command line built-in compression/extraction tool?

    - by Will Marcouiller
    I need to write a batch file to unzip files to their current folder from a given root folder. Folder 0 |----- Folder 1 | |----- File1.zip | |----- File2.zip | |----- File3.zip | |----- Folder 2 | |----- File4.zip | |----- Folder 3 |----- File5.zip |----- FileN.zip So, I wish that my batch file is launched like so: ocd.bat /d="Folder 0" Then, make it iterate from within the batch file through all of the subfolders to unzip the files exactly where the .zip files are located. So here's my question: Does the Windows (from XP at least) have a command line for its embedded zip tool? Otherwise, shall I stick to another third-party util?

    Read the article

  • Prevent a program from creating files in a users home directory

    - by Matt Clark
    I run an engineering program for class, Quartus 2. The issue i am having is that every time i launch the program, it creates 10 bitmap files in my home directory. This is not so much of a problem, it just makes my OCD hurt :( I can delete them without affecting anything, but every time the program is launched it recreates them, and there is nothing in the program (that i have found) that stops these files from being created. Is there anything i can do to prevent this program, or any profram from creating files like this in my home folder?

    Read the article

  • My Thoughts on Reinventing the Wheel

    - by Matt Christian
    For awhile now I've known that XNA Game Studio contains built-in scene management however I still built my own for each engine.  Obviously it was redundant and probably inefficient due to the amount of searching and such I was required to do.  And even though I knew this, why did I continue to do it? I've always been very detail oriented, probably part of my mild OCD.  But when it comes to technology I believe in both reinventing the wheel and not reinventing it all at the same time.  Here's what I imagine most programmers doing.  When they pick up XNA, they're typically focused on 'I want to make a game with as little code as possible'.  This is great and XNA GS is a great tool, but what will it do for programmers that want to make games with XNA?  If they don't have any prior experience with other tools they will probably not ever learn scene management. So is it better to leverage code and risk not learning valuable techniques, or write it all yourself and fight through the headaches and hours of time you may spend on something already built?

    Read the article

  • Am I the only one this anal / obsessive about code? [closed]

    - by Chris
    While writing a shared lock class for sql server for a web app tonight, I found myself writing in the code style below as I always do: private bool acquired; private bool disposed; private TimeSpan timeout; private string connectionString; private Guid instance = Guid.NewGuid(); private Thread autoRenewThread; Basically, whenever I'm declaring a group of variables or writing a sql statement or any coding activity involving multiple related lines, I always try to arrange them where possible so that they form a bell curve (imagine rotating the text 90deg CCW). As an example of something that peeves the hell out of me, consider the following alternative: private bool acquired; private bool disposed; private string connectionString; private Thread autoRenewThread; private Guid instance = Guid.NewGuid(); private TimeSpan timeout; In the above example, declarations are grouped (arbitrarily) so that the primitive types appear at the top. When viewing the code in Visual Studio, primitive types are a different color than non-primitives, so the grouping makes sense visually, if for no other reason. But I don't like it because the right margin is less of an aesthetic curve. I've always chalked this up to being OCD or something, but at least in my mind, the code is "prettier". Am I the only one?

    Read the article

1 2  | Next Page >