It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Why do IDEs structure code as "Projects" or "Solutions"? And no, I'm not trying to troll, I really want to know what people use them for.
It always seems to me like "Project" is just a redundant alias for "executable", and I find the "Project" structure tends to get in my way when I want to share code across several executable processes. This is especially true in languages like Java, where there's already a rigorous packaging system for organizing code with, but it applies to pretty much every IDE I've seen. So why do they always adopt this structure? Is there some trick to using it?
It always seems to me like "Project" is just a redundant alias for "executable",
I actually tend to think of "project" more as a "compilation unit" or a "deployment item" - at least for most compiled languages. Projects typically map to a single executable or library (or other compilation unit in languages where that's supported).
As such, a "project" is a very valuable method of organization.
Not all IDEs use these names, but in general, they are a way to organize code.
This is needed in any code base of a certain size - some sort of hierarchy that helps and logically separate code components from each other.
A solution can contain multiple projects. This concept is very much useful when you have a tiered software achitecture.
e.g. A solution can have following projects:
Data Access Layer Project
Business Layer Project
Presentation Layer Project
Every Project (tier) has a specific purpose in the same website.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I recently came across John Levine's book "Linkers and Loaders." This book was written in the year 2000. If anyone has read his book, is everything the author says still relevant for Objective-C in the year 2013? I am asking, because it looks like a good book to have on my shelf, but if the info is out of date I probably don't want to really study the book.
Thanks!
Yes & no...
I don't know that specific book, but if it was up-to-date in 2000 then the material in it should still be valid to learn about how things work under the hood.
However, you do not really need to know anything about linking and loading to understand variables and pointers.
Nor do you need to understand symbol tables as such. A symbol table is a data structure used by compilers to track variables during compilation as part of translating the program code your write into the instructions the CPU understands.
The concepts of variables and pointers in programming languages are abstractions of the concepts of memory locations and memory addresses at the CPU level (which themselves are in some sense abstractions of lower-level stuff, ending up with circuits and, if you dig deep enough, electrons! ;-))
What you should be looking for is a book on programming language concepts rather then compiling, linking and loading. A good book will introduce variables and types, then composites such as arrays and records, and end up with objects (which are essentially just variables you'll discover). Types and variables go together, one says how to interpret a collection of bits the other provides somewhere to keep collections of bits. A pointer is a value (collection of bits) of some pointer type, just as an integer is a value of some integer type.
Variables and pointers are not difficult concepts, but they are often misunderstood - plenty of questions on SO stem from misunderstandings of these concepts - so your quest is good, go and read! Apologies, but I've no reference to hand.
Given that ObjC has been in active use as a natively compiled language since the late '80s (prior, it was largely a precompiler generated language + runtime) and has supported linking/loading since then, too, it'll be as applicable as the book can be to any language derived from C. With that said, it is likely largely a waste of your time to dive too deep in that linking/loading are details that are taken care of by the system with little [OS X, OpenStep] to no [iOS] configurability to the developer.
Certainly, an interesting divergence, though, and a deep understanding of linking/loading is relevant to any work related to compilation and execution tool chains.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need to create an excel file and write into it from a list of objects and convert the excel into a pdf using c# but not use any third party document nor ITextSharp. Just plain and simple C# code. No other components.
You don't want to do this. Here's why: PDF is a non-trivial file format. Yes, you can sit down with the spec and come up with an understanding and let's assume that you are as efficient and clever an engineer as me (I work on PDF tools for a living and worked on Acrobat). It will take you at least two to three months working full-time to have the infrastructure to create decently rich PDFs in a way that is reliable and maintainable. Let's say that you're not as good an engineer as me. It will likely take you the same three months to create tools to generate PDF and the tools will be hard to maintain, hard to extend for future needs, and likely will generate incorrect PDF that Acrobat and my tools are expected to accept and interpret in a meaningful way.
Maybe your project has dictated "NO THIRD PARTY ASSEMBLIES." If so, you might want to explain the cost of your time (and future time) and why it's not so bad to have a third party library. I can tell you right now that the tools I build aren't cheap, until you consider that the time it will take you to go from download to a generated PDF document will be somewhere between a couple hours and a couple days, depending on how complex your needs are and you will not need to know the PDF spec.
But if you choose to go this route, be sure to download the PDF spec from Adobe and make sure that you read section 14.3.3 about the Document Information Dictionary, and make sure that you fill in the Producer section in every document you generate, because whenever I find PDF files that are wildly out of spec, that's the first place I look to find out who was responsible and I make note and promise to curse loudly and question your parentage (fair's fair - if you use our tools and find that my code has generated a bad PDF, you're free to do the same and I invite you to contact our support line so we can make it right).
There is an open source library called PDF Sharp
About the excel file, just use an open source file format for it.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to design an easily extensible item system for my game where I don't need to modify existing code much. I want to add items with new effects on the fly.
Traits my items have in common:
A name,
a description,
an npc sell price,
if it can be equipped,
required level,
if it is usable in battle,
if it is usable outside of battle,
a cooldown
So I can encapsulate this already into a class. But now there are item effects.
Example:
heals x health points,
heals x mana points,
removes debuff x,
adds buff x,
gives x stat points on equipping,
has x% chance to create some other effect when equipped,
etc.
And those can be combined like: heals x health and mana points. The first four are examples for effects a usable item can have while the last two are examples for effects equipable items can have.
The idea behind it is that I have this structure in a database as well and I can add a new item with a new effect combination in my database, my code reads this then and builds it together into a new fancy item, without me having to modify much. The only time I need to modify my code is when I add new effects obviously.
How would you put this together in design pattern(s)?
I thought of decorator. Is there a different, better design pattern for this or maybe even a combination of multiple design patterns?
It seems a decorator pattern is good for your needs. Think of a pizza with different tops. You can warp the basic pizza with many tops and at the end you call a function to sum the prize or whatever. It's a kind of wrapper and you pass the object to the next class. Hence you need only a basic class and can add new (top)-class when you need it.
You can use Decorator Pattern to decorate your objects with additional functionality without modifying them.
This isn't a direct answer to your question, though I believe it needs more words than can fit into a comment:
Picking a design pattern for a chunk of code is not something which you would typically do up-front (If you do it this way, be prepared to change it after you've seen it working); it's something which you're more likely to do after you already have some working code in-place and are looking to refactor it. - Chances are that whatever decisions you make now will be affected by many (currently) unknown factors once you've started writing code.
I'd suggest thinking more about the features, behaviour and functionality which you'd like to create, and then just begin writing code to see what works and further develop your ideas. Trying to solve a problem by designing it up-front around buzzwords like "factory", "decorator", "visitor" etc most likely won't lead you to a solution - design is very much an iterative process of continual improvement, change and refinement.
As an aside, and specifically on OO design, have a careful think about the SOLID principles while you're writing code; they should help you make decisions when you come to refactoring
http://www.blackwasp.co.uk/SOLIDPrinciples.aspx
http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have studied VB 6.0 but have hardly any knowledge of .NET. Can someone please tell me the difference between the three versions namely VB6.0, VB 2010 express and VB.NET?
Now this is a somewhat wide question, but in short, VB.NET is the language and VB 2010 is a VB.NET version released with Visual Studio 2010 and .NET 4.
So the main comparison should really be between VB6 and VB.NET because that's where you'll find the big differences.
VB.NET includes a lot of functionality that has been around in other languages like C++ for ages, and is by some considered way to different from VB6 even to be called VB anymore. But let's set aside the arguing for a moment, what are those new shining thingies? Well, among other you have this:
True object oriented inheritance
Overloading
Free Threading
Strict type checking
and alot more. Then there are some changes that might be a bit harder to adjust to since they're to close to the old one, like zero-based arrays, returning values from functions using a
return statement instead of using the function name, passing of parameters by value instead of by reference, new error handling (using try, catch, finally etc), usage of namespaces etc. The list goes on and on.
The shear breadth of the .NET Framework which VB.NET makes use of makes it a more versatile platform (IMO). It also runs in the CLR (Common Language Runtime) which is more or less a virtual machine with a just-in-time compilation engine.
When it comes to compiling, VB6 compiled to native code while VB.NET compiles to CIL (Common Intermediate Language) which makes it a lot easier to reverse engineer, however you can obfuscate the code in order to make it less readable.
As you can see from what I just wrote it's quite a wide subject, but if you have a more precise question, feel free to ask, otherwise I hope you have a bit clearer image of the differences now. :)
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I always think that life in general is really very complex and we don't even know all about it. But it works, right? that lead me to think if it was possible to think of a program as thinking of a group of differentiated cells. or maybe totipotent (the ones that can differentiate in any other cell) cells that differentiated.
I don't know if this is the right place to ask because involves biology and reprogramming.
thanks for interest
If your question is as stated in the title the you ought to look into Artificial Life and Digital Life. The prime example of Digital Life is Avida, where you have a bunch of computer programs thought of as organisms who compete for computer resources (such as CPU time and memory). Another example is the research by Schlessinger et. al. (paper here). They created digital single-celled organisms that could aggregate into a multi-cellular organism. Furthermore, the cells in their research are differentiated in that not all of them can perform all actions.
Moreover, there is a fair amount of research on computer simulations of morphogenesis, embryogenesis, cell differentiation, cell division etc.
The established field of Genetic Algorithms might be worth exploring:
http://www.catonmat.net/blog/genetic-algorithms-101/
http://delicious.com/tag/geneticalgorithm
Your question is very vague. But you should consider to look in the field of Systems Biology. If you are interested I provide you an article by H. Kitano Systems biology: A brief overview
During my internship I have been simulating/modeling a very simple cell of a microorganisms to study its behavior. But from my understanding to simulate a cell of human body is extremely difficult to do not to speak of modeling an eukarotic cell...
Programs basically already work this way.
The linux fork() command - duplicate the current process, and starts running it from the the same point in both processes. The program "knows" if this program is the original or the forked one, and invokes a code with respect to it [if the programmer designed it to do it, of course]
Also note, that like cells - all linux processes have the same origin - there is one process which is responsible for creating all others.