|
|
Search
|
|||||||
| Home | Register | Downloads | FAQ | Members List | Calendar | Arcade | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#61 (permalink) |
|
Knowledge is the solution
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Dec 2002
Location: Milwaukee, US. Previously in Mexico City
Posts: 6,558
|
Thats' why I'm coupling it with an easy programming language like python or basic in order to introduce as few elements as possible in each step.
__________________
|
|
|
|
| Advertisement | [Remove Advertisement] | ||
|
|
|
|
#62 (permalink) |
|
AKA snkmad
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Apr 2001
Location: Brazil, Fortaleza-Ceará
Posts: 3,300
|
I had problems trying to learn how to code alone. 1st i tried c++, then i moved to @ruantec C# classes. It was still confusing. Now i know why. What i was learning was language synthax, and not programming logic. At Uni now i'm studying a specific subject, programming logic. We use some sort of "portuguese pascal" just to understand how things should work, then we actually see how they work in Java. I'm really motived now, as i can actually understand what i'm studying, instead of only copy & paste code.
__________________
[Windows 7 RTM PRO X64] [Gigabyte GA-G31M-S2L] [Intel E5200@2.5Ghz] [Corsair XMS2 DHX 4GB DDR2 800MHz] [HIS HD4670 1GB GDDR3] [19" LCD SyncMaster T190] [Samsung SATA II HD322HJ 320GB] [LG HL-DT-ST DVD-RAM GH22NS30] (@gigaherz) S.N.K.M.A.D.: Synthetic Networked Killing and Masterful Assassination Device |
|
|
|
|
|
#63 (permalink) | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,381
|
Quote:
well one of the keys to learn is actually to have someone that helps you when youīre in need.. sadly iīve been unable to spend more time on my classes but still am thinking to bring them back again.
__________________
Current development tools: Visual C++.net, Visual C#.net Visual VB.net, Visual Webdeveloper.net Bloodshed Dev C++, Borland C++ Visual Basic 6 |
|
|
|
|
|
|
#67 (permalink) |
|
AKA snkmad
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Apr 2001
Location: Brazil, Fortaleza-Ceará
Posts: 3,300
|
@ruantec when/if you have some free time again, i could help you redesign your classes, to be more noob friendly. I can translate some of my class materials, to fit with your C# knowledge. That way i would also learn C# myself.
__________________
[Windows 7 RTM PRO X64] [Gigabyte GA-G31M-S2L] [Intel E5200@2.5Ghz] [Corsair XMS2 DHX 4GB DDR2 800MHz] [HIS HD4670 1GB GDDR3] [19" LCD SyncMaster T190] [Samsung SATA II HD322HJ 320GB] [LG HL-DT-ST DVD-RAM GH22NS30] (@gigaherz) S.N.K.M.A.D.: Synthetic Networked Killing and Masterful Assassination Device |
|
|
|
|
|
#68 (permalink) | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,381
|
Quote:
in the last time iīve been working on a special tutorial which will help people that have learned enough stuff in the course to learn how to write @ES from 0. the tutorial will cover the whole development from coding, design and maybe some of the Photoshop basics in order to create GUIīs for there applications... other than that i was thinking to teach how to create custom controls and so gain almost the full control of what they are doing... and who knows maybe i could help someone to create an app like this one
__________________
Current development tools: Visual C++.net, Visual C#.net Visual VB.net, Visual Webdeveloper.net Bloodshed Dev C++, Borland C++ Visual Basic 6 |
|
|
|
|
|
|
#69 (permalink) | |
|
You're already dead...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: Post-Apocalyptic Earth
Posts: 3,908
|
so i've been using xna and c# to code a game, and the more i code in c# the more i dislike it compared to c++. it has so much annoyances and is so limited. it doesn't trust the programmer making you do a ton of explicit casting and conversions. you have to explicitly convert integers to boolean expressions for conditionals like: int a = 1; if (a) {} is illegal, instead you need to do: int a = 1; if (a!=0) {} even this is illegal: int a = 1; if (!!a) {} you also have to cast enum's to primitive types which is annoying! Code:
enum cSharpIsLame {
NO = 0,
YES
}
....
someInt = (int)cSharpIsLame.YES;
but the biggest annoyance i've encountered is no local static variables in member functions! wtf! it makes code so ugly. you can't do Code:
public void foo() {
static int x = 0;
}
IIRC even java lets you declare static vars within methods, and AFAIK even vb.net does! another annoyance is that you have to specify array bounds with new. Code:
you can't do this: someClass myClasses[10]; for (int i = 0; i < 10; i++) myClasses[i] = new someClass(); you instead have to do this: someClass[] myClasses; myClasses = new someClass[10]; for (int i = 0; i < 10; i++) myClasses[i] = new someClass(); there were also a more annoyances but they've slipped my mind ATM >< there are a few things the c# does nicer than c++ though, so its not all-bad (garbage collection is kindof nice, and the use of strings is nicer, and its API/framework is easy), but the more i code in c# the more annoying things i find. its sad too because i was under the impression it was more versatile than this. but i guess i still recommend it to beginners if they want to start out with something more advanced than basic/vb. most of the annoyances i've encountered you have to be fluent and used to c++ to find annoying. if you've never used c++(and other similar languages) then you wont' notice alot of c#'s limitations/annoyances.
__________________
Quote:
check out my blog ![]() |
|
|
|
|
|
|
#70 (permalink) | |
|
Registered User
Join Date: Sep 2009
Location: United States
Posts: 36
|
Quote:
Code:
someClass[] myClasses = new someClass[10]; Code:
unsafe {
int* myInts = stackalloc int[10];
}
Can't come up with a defense for the other irritations, though I will say such strict type safety can prevent some typos and other mistakes from becoming bugs, IE: Code:
if(myInt = 25) instead of: if(myInt == 25) Last edited by nonoitall; 2 Weeks Ago at 08:05.. |
|
|
|
|
|
|
#71 (permalink) | ||
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,381
|
@ cottonvibes: While i understand your point of view and hope you donīt misunderstand me i think you havenīt reached yet a good level at C# coding to understand why things are done like that and what other ways you have to accomplish that in a different way.. while some of the points there are true there are many ways to do stuff in different approach.. complaining about a language just because some stuff are different than C++ doesnīt make sense.. remember C# is C# and C++ is C++ if they were sharing the same style i bet there werenīt 2 different languages but instead 1. it is true that some stuff in C# could be better but lets be honest C++ syntax is the most annoying language in many cases not to mention the overrated syntax. the real beauty of C# comes to light in other areas and not on simple stuff like you showed. now talking about annoying stuff isnīt C++ the most annoying language when it comes to GUI design? Quote:
Quote:
Code:
someClass[] myClasses; myClasses = new someClass[10]; Code:
someClass[] myClasses = new someClass[10]; foreach(someClass class in myClasses) class = new someClass(); Code:
List<someClass> myClasses = new List<someClass>(); for (int i = 0; i < 10; i++) myClasses.Add(new someClass()); myClasses.Add(new someClass()); myClasses.Remove(classToRemove); myClasses.RemoveAt(index); myClasses.AddRange(myClassListOrArray); myClasses.Contains(someClass); and so on........ in that way you donīt limit yourself to just an array of 10 but you can add/remove/addRange(add an entire array etc) anytime. and if you use Dictionary<> you can add even keys etc. so i donīt see the point for so much complaining but i understand why youīre dissapointed as the code you wrote there is very basic and it wonīt get you far. also if you want an array of classes thatīs the worst way to do your stuff as you have Lists<myclass> or Dictionary<myclass,type> and you can even go further and create Lists<Lists<myclass>> of lists or lists of lists containing lists lol hehehe. those methods are great to build a puzzle structure where you load the stuff you need when its needed and unload un-necessary stuff as well when its not needed anymore. the complexity of the logic is in your hands so to say. With all that am not saying C# can do everything but C++ canīt do everything either. the main difference is that if i canīt do something in C# that is possible with C++ or probably i just know how to do that in C++ i still can use C++ code in C# to do the desired task(just as i did in @ES just because i didnīt knew how to do a task in C# but i knew how to accomplish it in C++) while in C++ i canīt use C# code ![]() last but not least i didnīt mean to attack you by any means but it makes no sense to me to complain about those small things when your code tells me youīre still in the basics of C#(no offense).
__________________
Current development tools: Visual C++.net, Visual C#.net Visual VB.net, Visual Webdeveloper.net Bloodshed Dev C++, Borland C++ Visual Basic 6 Last edited by @ruantec; 1 Week Ago at 20:28.. |
||
|
|
|
|
|
#72 (permalink) | ||||
|
You're already dead...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: Post-Apocalyptic Earth
Posts: 3,908
|
Quote:
so in c# you can use the 'new' keyword on class member variable declarations. Quote:
int a[10]; vs int[] a = new int[10]; considering most languages (that i've coded with) will use the first syntax, its annoying c# doesn't support it. Quote:
brings me back to my point that c# doesn't trust the programmer. some people like that, some people don't. i personally like a lot of options in a programming language, and i like being able to do cool tricks because of the freedom the language gives. as a minor example, stuff like: int a = 10; int b = !!a; // makes b = 1; you can't do cool things like that when languages restrict you so much. some people think c++ is very evil because it lets you get away with some tricky things; but i think its awesome because you CAN do such cool things.
__________________
Quote:
check out my blog ![]() |
||||
|
|
|
|
|
#73 (permalink) | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,381
|
cotton is not that C# doesnīt trust programmers it just tries to keep you in the right path to avoid possible errors you could do/get... eitherway there are ways to overcome that.. i forgot one more thing about your static variable problems in C# on my previous post and i know the solution to your problem: Quote:
Code:
public static void foo() {
int x = 0;
}
now whatīs the main difference??? i donīt have to declare variables inside that method as "static" as everything i declare there its static. so instead of writing this: Code:
public void foo() {
static int x = 0;
static int y = 1;
static int z = 2;
}
Code:
public static void foo() {
int x = 0;
int y = 1;
int z = 2;
}
![]() now why doesnīt C# support static method variables the way other languages does? First, it is possible to get nearly the same effect by having a class-level static(just as i showed), and adding method statics would require increased complexity. Second, method level statics are somewhat notorious for causing problems when code is called repeatedly or from multiple threads, and since the definitions are in the methods, it's harder to find the definitions.
__________________
Current development tools: Visual C++.net, Visual C#.net Visual VB.net, Visual Webdeveloper.net Bloodshed Dev C++, Borland C++ Visual Basic 6 Last edited by @ruantec; 1 Week Ago at 15:44.. |
|
|
|
|
|
|
#74 (permalink) |
|
Knowledge is the solution
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Dec 2002
Location: Milwaukee, US. Previously in Mexico City
Posts: 6,558
|
Static variables in non-static methods are useful in the case of constant static variables. For example Code:
public void foo() {
const static int internalImportantValue = *some calculation that only happens once*;
int restOfVariables;
}
__________________
|
|
|
|
|
|
#75 (permalink) | |
|
代言人
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Dec 2006
Location: 應許之地
Posts: 5,125
|
I learnt C++ first, and C# just doesn't really register for me ![]() I do know MEL script though, which is like a combination between C and C++ with Maya library.
__________________
Quote:
![]() QX9650 @ 4.0GHz | 4x G.Skill 2GB DDR2 1066 | Vista 64 Ultimate | Quadro FX4600 (similar to 8800GTX) | X-Fi Elite Pro | SAMSUNG 2253BW | Cosmos S | ASUS RAMPAGE FORMULA | 2x 150GB Raptor X RAID0 | ThermalTake ToughPower 850W | ZEROtherm Nirvana |
|
|
|
|
|
|
#76 (permalink) |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,381
|
Yea C++ its awesome and thatīs a fact.. i havenīt coded in C++ for quite a while now as i havenīt seen the need to write any C++ code except for a small feature in @ES which i didnīt knew how to do in C# but i did knew how is done in C++. either way in my eyes most of languages are awesome and just want to clear something.... Am by no means trying to push C# as the saviour of all our problems nor saying its the way to go but its the language i do recommend for a beginner.. many may end not coding in C# but instead in C++ but thatīs the idea.. beginners should choose whatever they like. what i definitely donīt believe is that languages are saviours or make a beginner a better coder. in my eyes the fastest language in the world is useless in the hands of a non-skilled coder so even using the best tools if you donīt code your project well you will end having a dissaster and even the fastest language canīt help as the coder is the one that makes the magic and not the language. am preparing some stuff which i will post soon here and its about the results you can get even on languages that are described as "slow" were iīll show the proof that iīve got probably the worlds fastest algorithmn ever made in the history programming... and all started one day in the morning while eating some cheese balls which i used to simulate the flow lol... that day i got an idea that its going to proof what could even be done using crappy tools such as VB6. i think is a good info because coders here have been talked about coding execution speeds since quite long time now and maybe i got it wrong(even loving C++ as hell) but i have the feeling many are trying to let beginners think only C++ is the magic language and that is what bothers me a lot(i donīt consider C# as the magic language either but just as a good language). Results iīve got so far: - 68MB memory usage - 258GB of pure Audio - 54.000 files to scan - Full MP3 tags - Covers with pictures - loaded in 20 seconds all that in VB6.. the test cought my attention and am planning to do the same in C#. also during our tests weīve discovered that thereīs not a single audio app on earth capable to handle such amount of data nor load the information in 20 secs(58 secs at the first run) regardless of the language the app was written nor the team behind. of course other C/C++ coders are going to come with the low-level argument as its the only one we(C/C++ coders) have.. tho am talking about coding excecution, coding logic and algorithmn just in case.
__________________
Current development tools: Visual C++.net, Visual C#.net Visual VB.net, Visual Webdeveloper.net Bloodshed Dev C++, Borland C++ Visual Basic 6 Last edited by @ruantec; 1 Week Ago at 16:41.. |
|
|
|
|
|
#77 (permalink) | |
|
Knowledge is the solution
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Dec 2002
Location: Milwaukee, US. Previously in Mexico City
Posts: 6,558
|
Quote:
On a more serious note, those are some impressive results, but if you want to tout it as a super effective algorithm you might want to generalize it to a more general case than data loading. Otherwise it is more like a super fast program just in that particular application. Which is very respectable in and of itself.
__________________
Last edited by Proto; 1 Week Ago at 16:39.. |
|
|
|
|
|
|
#78 (permalink) | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,381
|
Quote:
again i want to clarify something: The reason why iīll post that info and maybe if someone is interested i could share some ideas etc. is not to glorify myself as am not interested in it.. what i do here i do it for fun and so i code for fun.. i never look for competition nor see other projects as competition as we are all coders and thatīs what count.. the main reason i post my results here is to show that there are always ways to do things if you look for a way to do it right. also am always open for conversations so i have no problems to discuss my opinions or ideas with others and so everyone could learn from me as well as i could learn from others. i wanted to clarify that as iīve started to have the feeling that maybe people could see what i do as competition or such thing(i hope am wrong on that)...thatīs maybe the reason for some controversy as many coders probably donīt understand why i make "X" post/project showing something when in reality am just having fun coding and love to share the information with others that may be interested.... as for the rest i always think they could ignore it.. well i thought it would be a good idea to clarify this just in case. anyways thank you for your suggestions mate and iīll take them in count
__________________
Current development tools: Visual C++.net, Visual C#.net Visual VB.net, Visual Webdeveloper.net Bloodshed Dev C++, Borland C++ Visual Basic 6 Last edited by @ruantec; 1 Week Ago at 17:04.. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|