language-agnostic

In 0-based indexing system, do people call the element at index 0 the "first" or the "zeroth" element?

In Java/C++, for example, do you casually say that 'a' is the first character of "abc", or the zeroth? Do people say both and it's always going to be ambiguous, or is there an actual convention? A quote from wikipedia on Zeroth article: In computer science, array references also often start at 0, so computer programmers might use...

Generating all unique combinations for "drive ya nuts" puzzle

A while back I wrote a simple python program to brute-force the single solution for the drive ya nuts puzzle. The puzzle consists of 7 hexagons with the numbers 1-6 on them, and all pieces must be aligned so that each number is adjacent to the same number on the next piece. The puzzle has ~1.4G non-unique possibilities: you have 7! o...

Can these sorts of programs exist in every Turing-complete language?

In every Turing-Complete language, is it possible to create a working Compiler for itself which first runs on an interpreter written in some other language and then compiles it's own source code? (Bootstrapping) Standards-Compilant C++ compiler which outputs binaries for, e.g.: Windows? Regex Parser and Evaluater? World of Warcraft clo...

Programming Concepts: What should be done when an exception is thrown?

This does not really apply to any language specifically, but if it matters I am using VB.NET in Visual Studio 2008. I can't seem to find anything really that useful using Google about this topic, but I was wondering what is common practice when an exception is thrown and caught but since it has been thrown the application cannot continu...

What is the most concise programming language?

What is the most concise programming language? in case a criteria is needed for conciseness: on balance requires the least amount of characters to create any given program. ...

How to begin with augmented reality?

I'm currently an undergrad in computer science and I'll be entering my final year next year. Augmented reality is something I find to be a really interesting topic, but I have no idea where to start learning about it. Where do you start learning about this topic and what libraries are available? ...

Obtaining IP addresses in Bittorrent

I am trying to get a list of IP addresses serving or downloading a file. What I did was to contact a tracker like openbittorrent.com to get the following (as part of the scrape file): B%00%00%0C%5F%B1%B1l%CAGa%84S%CB%B0%9BG%84%3BE:0:1 Now, the long string in the beginning is the info hash. As a next step, I did this: http://tracker.s...

Reimplementing data structures in the real world

The topic of algorithms class today was reimplementing data structures, specifically ArrayList in Java. The fact that you can customize a structure for in various ways definitely got me interested, particularly with variations of add() & iterator.remove() methods. But is reimplementing and customizing a data structure something that is...

in google analytics, what is 'ga:accountName' for ?

In google analytics, what is 'ga:accountName' for ? it might seem like a straightforward question but I can't find anywhere some documentation which tells me what ga:accountName is supposed to return. if I run the google's code from the java example: private static void getAccountFeed(AnalyticsService analyticsService) thr...

What's a good starting point, tutorial, or project, to learn database programming?

I've been a Software Developer now for over 10 years. I've mostly worked in Embedded C with some time spent on C++ (limited) and Java. I'm looking to learn some new technologies and skills. I thought that database programming may be interesting to learn. I would like to make my own pet project in order to learn these things. My plat...

What technologies should I focus on to work as a developer in Japan?

I'm thinking of one day moving to Japan and I was wondering if anyone here has any experience working there. I'm curious as to what languages/technology are popular there for web development and software development. I have heard Ruby is/was strong there due to its founder being Japanese. What would you recommend someone focus on if t...

In what situations is octal base used?

I've seen binary and hex used quite often but never octal. Yet octal has it's own convention for being used in some languages (ie, a leading 0 indicating octal base). When is octal used? What are some typical situations when one would use octal or octal would be easier to reason about? Or is it merely a matter of taste? ...

What do we log and why do we log it?

This has been bugging me for quite some time. Reading various questions on SO, blogs and listening to colleagues, I keep hearing how important "logging" is. How various logging frameworks stack up against each other, and how there are so many to pick from it's (apparently) ridiculous. Now, I know what logging is. What I don't know is ...

Scrape HTML tables from a given URL into CSV

I seek a tool that can be run on the command line like so: tablescrape 'http://someURL.foo.com' [n] If n is not specified and there's more than one HTML table on the page, it should summarize them (header row, total number of rows) in a numbered list. If n is specified or if there's only one table, it should parse the table and spit i...

How to design a command line program reusable for a future development of a GUI?

What are some best practices to keep in mind when developing a script program that could be integrated with a GUI, probably by somebody else, in the future? Possible scenario: i develop a fancy python CLI program that scrapes every unicorn images from the web i decide to publish it on github a unicorn fan programmer decides to take t...

Language Agnostic Basic Programming Question

This is very basic question from programming point of view but as I am in learning phase, I thought I would better ask this question rather than having a misunderstanding or narrow knowledge about the topic. So do excuse me if somehow I mess it up. Question: Let's say I have class A,B,C and D now class A has some piece of code which...

Best directory to store application data with read\write rights for all users?

Hi guys. Until Windows Vista I was saving my application data into the directory where the program was located. The most common place was "C:\Program Files\MyApplication". As we know, under Vista and later the common user does't have rights to write under "Program Files" folder. So my first idea was to save the application data under "A...

view handler design pattern

I'm trying to figure out the origin of the view handler design pattern in software engineering. Many of the design patterns in software engineering were inspired by things which pre-date computers, and I was wondering if anybody had any insights on the origin of this particular pattern. ...

Should I write my own forum software?

I have already built a site from scratch. It has banning, PM, comments, etc. The PMs and comments are done using markdown (like SO). There are pros and cons for writing my own or using another software. But some cons keeping me from using another forum software is Multiple Logins: One for the site, one for separate forums. Need to Cu...

Improper integral calculation using numerical intergration

I'm interested in calculation of Improper Integral for a function. Particularly it's a Gauss Integral. Using a numerical integration does make sense for a definite integrals but how should I deal with improper integrals ? Is there any was to extrapolate the function "around" negative infinity or should I just remove this part and start...