10,268 reputation
43549
bio website programmers.stackexchange.com/…
location Bad Rappenau, Germany
age 44
visits member for 4 years, 2 months
seen 3 hours ago

writes code

ruby (on rails), c++, python, pascal, vb, ti-basic, sql, js, jquery, html, xml, qt

find me on Google+


1d
comment I'm really terrible programmer. please help
You could try solving programming puzzles (like Project Euler or Code Katas, just google for it there are many) this would make you more confident in using the basic building blocks of programming like loops, variables, functions and you would learn to split a large problem in smaller problems. For some people this seems to be their basic mode of thinking, so it's easy for them. Others have to learn it, but it definitely is something that can be learned. It's very similar to solving mathematical problems as npinti says. (Maybe first solve a math problem and then write some code to do the same.
Mar
25
comment Is it possible to layer filesystems on top of each other?
Not sure if that's what you are looking for but if I remember right then Hadoop Filesystem works somewhat like this.
Mar
25
comment How much programming should I know at the age of 17?
Follow your curiosity for now. What you already know shows that you are serious and can make good decisions about what to learn. Write lots of code. Maybe have a look at some functional languages like Haskell. Try to add some theoretical things about algorithms and data structures. Something about databases is important too, since at some point you will need this a lot.
Mar
25
comment PHP vs Python. Which is best for me and my situation?
You won't find many people using PHP for analytics. Python is much more used in this area. Also quite a few other languages like R depending on how math heavy your analytics are. But for a start you would maybe move around and clean a lot of data. I use Ruby for a similar project, but mainly because the website with which it interacts is a RoR project and most data processing is based on Elasticsearch queries, so no heavy programming for now.
Mar
24
comment What is the difference of System Architect from a Software Engineer
@Philipp it's at least as good as your answer and has much more detail.
Mar
24
comment What is the difference of System Architect from a Software Engineer
Systems Architect
Mar
17
comment Is this a race condition?
Is the calculation of the total and updating the sum field a single query?
Mar
13
comment Can i write html on one line only in my php code?
Yes, a lot of sites run their html, css & javascript through minimizers that remove unnecessary whitespace (and do other optimizations). The result looks mostly like this. Though I don't see why you would care about those few bytes in this specific case.
Mar
12
comment Java and C++ connection?
This may depend on how easily you get confused I guess. There are some similarities as there are huge differences. Most programmers at some point master several languages and it's not that difficult. Maybe just give it a try and concentrate on the one you more like if you get confused and feel that you lose too much time that way.
Mar
11
comment In a program written in Pascal, what hardware components are used?
A program can use mostly any hardware components it likes (depending on OS and various access restrictions). It can place data in memory, video memory, write to hard disks or printers or communicate with any part inside the PC or attached to it (eg trigger the LEDs on your keyboard), send sound to a speaker. Obviously everything happening on your computer is done by 'programs' so programs must be able to do all those things.
Mar
11
comment In a program written in Pascal, what hardware components are used?
It's stored in RAM and executed by the CPU. Your writeln('hello') example will be stored in RAM as a combination of executable code (mostly to move around data and trigger OS functions for rendering) and data (the string 'hello'). What exactly happens would depend on the OS this runs on (and more details). With todays GUIs this will lead to a rather complex set of operations that will render the text with the help of font information and finally output the result (kind of bitmap) into a window which in turn means changes to video memory on your graphics card.
Feb
23
comment Database data Bucketing Report Design
If the only interesting option here is if the item exists in the time range why do you even count? (instead using "select count(*) ... group by item_id, customer_id" maybe?) Also how arbitrary are your date ranges? Are those always months? Or could it also be something like 15.1.2014 to 30.1.2014 or even something like calendar weeks? You could have buckets (as for example months) and a unique key on bucket_id (the month) and item_id (and maybe customer_id if that is relevant in the context) so duplicates are rejected on the db level.
Feb
3
comment What's the benefit of GIT for solo programmer?
Every five minutes: Well, I don't do it that often, but basically it's a backup, so if my local machine crashes I get the work back. Why branches: because then I can work on something new and still fix bugs on master. A branch may take days or even weeks.
Jan
28
comment Creating variables in methods/functions
@Bas there are really lots of cases where variables make sense even if only used once. Think of very long and complex calculations or string concatenations for example when you generate html or sql strings (in many cases there may be better options than string concatenation to do this but if you have to having subsections with clear names may make such things much more readable)
Jan
28
comment Creating variables in methods/functions
Basically all of this as needed. You can use variables for the sole purpose of increasing readability (though you don't have to always do this, just use where it makes sense). In some cases you may even split a function in several sub functions for readability, even if those new functions are only called once. Your second example may not be too great, but if there is some deep nesting it may become more interesting. Also when you have rather complex calculations that become difficult to read you may split them into smaller steps that way.
Jan
28
comment Application with really dynamic data structure
Without knowing what exactly changed and what types of query run on this data this is quite difficult to say (also other information like data volume etc). Maybe some kind of schema less store (nosql document store like Elasticsearch) would be easier to use.
Jan
26
comment What's the best practice for adding a lot of attributes to a Rails model?
Maybe you would be better off serializing the data and doing the search with something like Elasticsearch. It's easy enough, adds lots of bonus features (full text search one of it) and if the project grows you will use it anyway.
Jan
23
comment If-else in C++ Programming Language
Look, with "no sense" I just meant that the if works differently and part of this is ignored, and that it only compiles for some details of how C++ works (as basically npinti explains in his answer). Yep, you learned something important here (C++ can make a true/false value out of a lot of things). This is actually the source for many errors (like by accident assigning a value with x=0 instead of comparing x==0). You are totally right to try out such things, even if they look weird. But that is why I asked what you did expect it to do.
Jan
23
comment If-else in C++ Programming Language
Just because it compiles doesn't mean it makes sense. Also the compiler actually gives you a warning about this: warning: left operand of comma operator has no effect
Jan
23
comment If-else in C++ Programming Language
My C++ is a bit old now, but this (a,b,x,y) doesn't make much sense here. It may only evaluate the last item y which is 0 and therefore falsy. What did you expect this to do?