|
Jam2 posted:An important factor is the authenticity of the experience. What does this mean? Aged and tedious to use? For that go with one of the BSDs instead of Linux.
|
# ? Mar 18, 2011 07:13 |
|
|
# ? May 15, 2024 04:00 |
|
MrMoo posted:What does this mean? Aged and tedious to use? For that go with one of the BSDs instead of Linux. I don't want a flavor of Linux that attempts to mimic the Windows experience to the point of no longer being an environment useful for learning what makes Linux great. Thus, I don't want an apologetic distro that attempts to convert a Windows user by offering sacrifices to make the transition more pleasant at the expense of something else.
|
# ? Mar 18, 2011 07:30 |
|
Well generally you have your Unix or similar boxes and then remotely connect via PuTTY or other SSH program. Therefore you are not ever setting at a Linux or Unix desktop to do your work unless you really, really want to. Thus it doesn't matter whether you choose Fedora, Ubuntu, Debian, or whatever distribution.
|
# ? Mar 18, 2011 07:46 |
|
MrMoo posted:Well generally you have your Unix or similar boxes and then remotely connect via PuTTY or other SSH program. Therefore you are not ever setting at a Linux or Unix desktop to do your work unless you really, really want to. Thus it doesn't matter whether you choose Fedora, Ubuntu, Debian, or whatever distribution. I will just run Fedora then. This as a VM is suitable for learning to program C? I am asking basic questions because the road ahead is shrouded in mystery. Jam2 fucked around with this message at 07:54 on Mar 18, 2011 |
# ? Mar 18, 2011 07:51 |
|
Since you're already using a MacBook, I feel obliged to point out that you can do C systems programming perfectly reasonably in Mac OS X, which provides a complete UNIX environment derived from FreeBSD. But yes, you can use any Unix distribution you please to learn C.
|
# ? Mar 18, 2011 08:15 |
|
rjmccall posted:Since you're already using a MacBook, I feel obliged to point out that you can do C systems programming perfectly reasonably in Mac OS X, which provides a complete UNIX environment derived from FreeBSD. What's the bare minimum needed to do exercises from "The C Programming Language?" What niceties are there for C in OS X?
|
# ? Mar 18, 2011 08:28 |
|
Jam2 posted:What's the bare minimum needed to do exercises from "The C Programming Language?" What niceties are there for C in OS X? A compiler. For Mac OS X, it's easiest to pop in your Mac OS X install disc and install the Developer Tools. That'll put gcc in your path and give you Xcode if you need some heavyweight text editing. There aren't any specific niceties for C in Mac OS X with the possible exception of TextMate, a text editor. Though if you want some objects with your C, Mac OS X hosts the best Objective-C environment and libraries, so that's a tangental nicety.
|
# ? Mar 18, 2011 09:39 |
|
PDP-1 posted:In general I don't know the value of the constant C, it is a function of how the experiment producing this data is set up and will vary from measurement to measurement. The value of C is also 'big' in the sense that it accounts for about half the amplitude of the total signal so I can't just approximate it as zero. Whatever fitting algorithm I end up with will need to be able to solve for all three parameters independently. Numeric stuff is really not my thing but would this work be appropriate to do with Matlab (assuming it's in your budget)? Matlab can talk to .NET fine, and you can buy the capability to compile Matlab code into .NET assemblies. It could be super overkill but I don't know the scope of what you're doing.
|
# ? Mar 18, 2011 10:36 |
|
PDP-1 posted:f(x) = A*exp(x*B) + C f(x) = A*exp(x)*exp(B) + C = D*exp(x) + C ? edit: oh wait Scaevolus fucked around with this message at 15:35 on Mar 18, 2011 |
# ? Mar 18, 2011 14:47 |
|
Scaevolus posted:Can't this be simplified? A*exp(x*B) is A*(exp(x))^B, not A*exp(x)*exp(B).
|
# ? Mar 18, 2011 15:05 |
|
pokeyman posted:A compiler. I've been looking into xcode. Am I cheating myself out of useful knowledge by going straight out of the gate to xcode and llvm instead of a traditional editor and gcc?
|
# ? Mar 18, 2011 23:12 |
|
In my opinion, the act of computer programming is far less interesting than having a working application. Use whatever tool gives you a decent product with the least effort (xcode)
|
# ? Mar 18, 2011 23:26 |
|
The choice of editor is independent from the choice of compiler; feel free to use an LLVM-based compiler from the command line (where they'll be called llvm-gcc and clang). Using XCode — really, any IDE — will indeed "cheat" you out of some knowledge: you won't learn how to manage your own build system, you won't learn how to use command-line development tools, etc. If part of this is an effort to capture "the experience", then you need to use an unintegrated text editor, write your own makefiles, learn how to drive gdb, etc. Furthermore, every time you find yourself doing something dull and repetitive — even something as simple as a multi-file search-and-replace — instead of brute-forcing it, figure out how to use existing command-line tools to do it for you. Usually that'll take a lot more time to achieve your immediate goal, but it's the only way you'll really learn to use those tools. Once you've learned all that, though, don't feel like you have to keep using it just to spite XCode.
|
# ? Mar 19, 2011 00:17 |
|
Where can I find some information on making design decisions for object oriented programming. I am working on developing a codebase and I feel like at every step of the way I am second guessing how I should go about organizing my work. I have a very good idea of what I need, just not the best way to go about organizing it.
|
# ? Mar 19, 2011 01:43 |
|
rt4 posted:In my opinion, the act of computer programming is far less interesting than having a working application. Use whatever tool gives you a decent product with the least effort (xcode) In my opinion, both are equally interesting. I get a lot of satisfaction out of just writing code whether or not it ever ends up in production.
|
# ? Mar 19, 2011 04:14 |
|
Jam2 posted:I've been looking into xcode. Am I cheating myself out of useful knowledge by going straight out of the gate to xcode and llvm instead of a traditional editor and gcc? llvm offers a significantly more comprehensive set of warnings and errors than gcc, unless you really like stabbing yourself in the eye I'd recommend learning with that.
|
# ? Mar 19, 2011 09:38 |
|
Gradually realizing I cannot apply the antiquated learning strategies of the natural sciences to learning to program. It is really just about writing a lot of programs.
|
# ? Mar 19, 2011 09:59 |
|
Jam2 posted:Gradually realizing I cannot apply the antiquated learning strategies of the natural sciences to learning to program. I dunno if this is useful to you: The way I learned to code was literally through iteration. First type in some c64 basic magazine program that asks your name and tells you how old you are based on your birthday & todays date. Then fix typos, then make that program ask more questions, and keep state of previous questions. Then have it be able to save that state. Then write lovely adventure games in QBasic on school computers, weird platformers in Hypercard, etc, etc. Each step of the way was basically: 10 write some code 20 attempt compilation (or interpretation) 30 fix bugs 40 goto 10 35 if no immediate errors show up goto 45 45 print "it works!" There's a lot to be said for thinking it all through & architecting, but that all comes after getting the gut feel for how computer makes sense of the stuff you write.
|
# ? Mar 19, 2011 10:15 |
|
Modern Pragmatist posted:Where can I find some information on making design decisions for object oriented programming. What are you trying to model? Can you give the classes? If not, have you tried making an UML diagram? What are your use cases? What are the actors?
|
# ? Mar 19, 2011 10:19 |
|
Jam2 posted:It is really just about writing a lot of programs. Pretty much this. Which tools you use can make it easier or harder, and there's important theory to be learned as well, but fundamentally, the way you become a good programmer is by programming.
|
# ? Mar 19, 2011 16:07 |
|
Not really a question, but I imagine there are a lot of programmers in this thread who read code posted on the internet. Lifehacker shared two Chrome extensions that automatically syntax highlight code on webpages. Code Highlight seems to do a good job highlighting code here on the SA forums...
|
# ? Mar 19, 2011 18:37 |
|
ToxicFrog posted:Pretty much this. True, but if you just keep repeating bad habits you're not going to get any better. There's a lot to be said for people who program in the old 'BASIC interpreter' style. Write a few lines, run it, change some stuff, run it again... It's a good way to learn how things work but eventually you want to be able to avoid making mistakes in the first place. It reminds me of some story I heard about Bill Gates or Steve Wozniak, they were going to demo a product and they had forgotten to write the program to actually load the version of BASIC they were going to use. So on the plane, they wrote the program out in paper and pencil and it worked the very first try.
|
# ? Mar 20, 2011 03:32 |
|
Bob Morales posted:There's a lot to be said for people who program in the old 'BASIC interpreter' style. Write a few lines, run it, change some stuff, run it again... I find myself doing this a lot when I don't know the API of some library I want to use.
|
# ? Mar 20, 2011 03:37 |
|
I saw comments in some code the other day at work that basically went like this:code:
'abc' vs 'amuchlongerpassword'
|
# ? Mar 20, 2011 03:40 |
|
Bob Morales posted:I saw comments in some code the other day at work that basically went like this: Well adding additional data to the password is typically called a salt and is useful in disrupting rainbow table methods. So really it has nothing to do with the length, so much as preventing pre-computation of the hash. PS Hire someone who knows something about security. Whoever left that comment does not. I hope I never do business with your company.
|
# ? Mar 20, 2011 04:10 |
|
I'm looking for a C++ geometry library, preferably lightweight. Ease of use is significantly more important than speed. The only operation that is absolutely essential right now is the ability to take a set of 3d points and test if a query point lies in their convex hull, but it would be nice to have a library for dealing with this kind of thing in general. I've looked a bit at qhull and cgal, but they are both very complicated, and significantly more than what I really need.
|
# ? Mar 20, 2011 07:58 |
|
Nippashish posted:I'm looking for a C++ geometry library, preferably lightweight. Ease of use is significantly more important than speed. I have no libraries to offer but that sounds like a fun-ish project that'd take a few nights' work, so I recommend you get on it and share what you come up with!
|
# ? Mar 20, 2011 11:04 |
|
Nippashish posted:The only operation that is absolutely essential right now is the ability to take a set of 3d points and test if a query point lies in their convex hull, but it would be nice to have a library for dealing with this kind of thing in general. The GJK algorithm would be useful for this problem and I'd bet you could Google up an implementation in C++ pretty quick. If you just have a set of convex points Pi and some query point Q the algorithm boils down to trying to find some sub-set of Pi, call it Pj, where Pj-Q encloses the origin. If no subset exists then Q is not enclosed by Pi. This guy gives a fairly clear, if long winded, explanation of how it works.
|
# ? Mar 21, 2011 00:06 |
|
Carthag posted:What are you trying to model? Can you give the classes? I guess the point of my question was to find a good reference that would help in generating the UML diagram etc. and understanding all of the associated terms. A little more on what specifically I'm dealing with. I am essentially writing code for an image viewer. The basic components being: 1) Images: 2D image data OR a multi-dimensional stack of 2D images 2) Image Metadata 3) Regions of Interest (ROIs): Identified by coordinates and displayed as either polygons or masks. There can be an infinite number of regions defined per 2D image An example of some of the issues that I am attempting to reason through: 1) Linking of data with display: Do you have a separate class (i.e. ImageWindow) that monitors the associated ImageStack for changes or do you have a show() method in each Image component of ImageStack? 2) Should ROIs be made an attribute of an Image or should you have ANOTHER container class that encapsulates an Image and its associated ROIs both as properties? I hope that this clarifies the perspective that I am coming from.
|
# ? Mar 21, 2011 01:00 |
|
PDP-1 posted:The GJK algorithm would be useful for this problem and I'd bet you could Google up an implementation in C++ pretty quick. I ended up finding this example in the cgal documentation which includes code to solve point-in-convex-hull problem so I decided to suck it up and go with that. I'll give GJK a look though, since it could come in handy later if I need to deal with intersecting volumes.
|
# ? Mar 21, 2011 04:17 |
|
I could use a little bit of programming career help here. I think I'm really getting stuck having not worked with some kind of web MVC framework like a Java application server and the supporting gamut of things like Spring/Hibernate. Or for that matter even asp.net or django. I've doodled with a few of them in the most basic ways and I understand the general gist. But that's not going to get me hired anywhere either. Would it be wise to develop the expertise in one of these on my own? Or should I perhaps try getting one step ahead with things like cell phones? My main languages are C++, Java, Python, and C#, if that helps. And I've done some basic stuff with databases, but not much with a library that tries to take care of the DB stuff for me. My perception is none of those technologies work fantastically the first time and being an expert there would be marketable.
|
# ? Mar 22, 2011 15:07 |
|
So I hear that unit testing is a thing that real grown-up programmers do... How can I start unit testing in an environment that is seemingly hostile towards testing? I don't really have time to finish what I'm working on in the first place. Secondly, most of the classes that I want to test can only be instantiated through a de-serialization process that takes input from a hugely complicated asset build system. Needless to say, nobody really tests anything here. We've got xunit with some stuff plugged into it, but if you invoke the existing tests, everything simply explodes because nobody has run them for years. The leads don't really care about this. I'm positive that I've never written a single piece of code here that is testable, let alone tested. Do I just ignore all of the code that I've already written and try to test new stuff? The problem with that is that I usually have no idea what I'm writing until I've written it (two or three times). How can I test the unknown?
|
# ? Mar 22, 2011 16:00 |
|
very posted:Do I just ignore all of the code that I've already written and try to test new stuff? Maybe unit tests are too painful for you to do without massive refactoring, but you could see if integration tests are easier to get off the ground. Testing's good, unit testing isn't always the most important kind.
|
# ? Mar 22, 2011 17:05 |
|
very posted:Do I just ignore all of the code that I've already written and try to test new stuff? The problem with that is that I usually have no idea what I'm writing until I've written it (two or three times). How can I test the unknown? For the type of code that you need to write 2 or 3 times before you know what you're doing, just ignore people who spew a TDD mantra at you, as they have likely never written anything where the challenge is architectural layout of classes rather than the implementation of said classes. TDD can be great but it's not always the best approach and it's okay to cover your code after writing it.
|
# ? Mar 22, 2011 17:37 |
|
very posted:How can I start unit testing in an environment that is seemingly hostile towards testing?
|
# ? Mar 22, 2011 19:13 |
|
Sneftel posted:This book was specifically written to address your problem. Thanks. This book looks great.
|
# ? Mar 22, 2011 19:27 |
|
So I must be just googling the wrong terms or some poo poo, because I cannot for the life of me figure out how to get Mathematica to give me a column of a n x m array. For example, in python, if I wanted just the first column of a n x m array, I just type in Array[:,0]. I'm sure there's an analog for this in Mathematica, but I just can't find it.... I'd rather not just write a lame loop to append about a million data points to make this the brute force way. Thanks in advance. EDIT: It figures as soon as I post this, I find the answer on stackoverflow. Thanks anyway! The answer is Array[[All,1]] etc. JetsGuy fucked around with this message at 00:02 on Mar 23, 2011 |
# ? Mar 22, 2011 23:57 |
|
very posted:So I hear that unit testing is a thing that real grown-up programmers do... I won't repeat what everyone else has said but it was all good advice that I agree with. A couple of additional things though: * From a technical side, have you looked into any mocking libraries? They might be able to take the complexity out of creating these objects in your framework. As long as you can resist the temptation to mock out everything, they can help you create useful tests in scenarios like yours. * From a non-technical side: quote:We've got xunit with some stuff plugged into it, but if you invoke the existing tests, everything simply explodes because nobody has run them for years. The leads don't really care about this. Unless you can change this attitude any tests you write will be worthless. It sounds like you really need a cultural change in the company more than anything and that sort of thing needs to come from the top down.
|
# ? Mar 23, 2011 02:28 |
|
I'm working on a project in Max/MSP, and I've found a way to send reports to the Terminal. I know there is a way to get terminal to then output whatever is going on into a text file, but I don't know how. Any guides/advice out there? I'm a novice in programming in general.
|
# ? Mar 23, 2011 05:47 |
|
|
# ? May 15, 2024 04:00 |
|
WrongWay Feldman posted:I'm working on a project in Max/MSP, and I've found a way to send reports to the Terminal. I know there is a way to get terminal to then output whatever is going on into a text file, but I don't know how. Any guides/advice out there? I'm a novice in programming in general. oh god you have my sympathies. I wouldn't wish Max/MSP on my worst enemy. With that said, if you execute max from the command line you can just redirect its output to a text file. the syntax for doing so (in bash) is programname > filename that will take all of the program's terminal output and store it in that file. I assume you're on os x, but the syntax is the same on the windows command line too. HOWEVER, why are you doing this? there's probably a built-in max object that handles whatever it is you're trying to do more elegantly
|
# ? Mar 23, 2011 13:43 |