Jump to content

Learning C# - My self-motivation thread


Recommended Posts

So to make a long story short, there were some scheduling problems at school, and I'm forced to take Programmming II at a different university.
The university I normall go to teaches Java, which I took a single semester of. The other university where I'm taking my second class teaches C#.

tl;dr
I have six days to do learn a semesters worth of C#, and I currently know the very basics of Java.

I have to learn the first seven chapters of a book which I don't have. I'll be following thenewboston's tutorials over C#, as they have previously helped in Java.
What I need to learn:

751debbdfabb6231d5d04bc9d734898e.png

https://i.gyazo.com/7445b1c568aa4cf51738b2ffa252f505.png

https://i.gyazo.com/58ef1272d899d02e66d9aa18b6f3bad9.png

https://i.gyazo.com/8f35a4f7e325bd52480aded7835d8db0.png

https://i.gyazo.com/2b39f70f8dee7b525d2fe0ee1b516f90.png

https://i.gyazo.com/3030264e280e5858ce9b335b81e74e9e.png

https://i.gyazo.com/812046667cadec14404053ca36b63529.png

https://i.gyazo.com/0656b53b95a24a9a43e60c1ccf489530.png



I'm not sure if I'll be able to do this, so I figured I keep a log of my progress. (Helps me stay on track, even though that might seem counter-intuitive.)

So far I have just finished the 10th video of these series, so I'll go ahead and try to upload it to Github, (Never used Github before...)

https://github.com/FallenArchangel/Learning

I'm open to any criticism. I'm kinda in a rush, so any advice is welcome.

Link to comment
Share on other sites

It shouldn't be too bad. I only had a formal class of Java I in school and I self-taught C# fairly easily. Most of the Object Oriented languages follow the same basics just a matter of learning the different words they use to do the same things. My favorite site for picking up on C# things quickly is http://www.dotnetperls.com/ They go pretty in depth on specific items so if you have something you want to know more about, that's a good place to search. Otherwise everything else I learned through codeproject examples/source and google searching.

Your git looks good, I can see your "initial commit?" (don't worry that gets easier the more you use it). I'll try to check back in on it and see if I can offer any help. Without formal training myself I may be more harm than good but I can use it to get stuff done pretty well.

Link to comment
Share on other sites

Don't sweat it that much. The bits mentioned there are the rudimentary building blocks of a program - knowing them makes you a beginner C# coder. Since you're already a beginner Java coder, you just need to get to the same level with a *slightly* (and I would say so slight it'll be annoying) different syntax.

So, chapter 2. Types and stuff. Java has primitive types and objects. For C# everything is an object. Even things like an int, meaning you can do stuff like "1.ToString()" or some such. Core types are mostly the same.

Chapter 3. In Java, you're tought to not access an object's properties by directly referencing that property (Object.property = 2) but instead access everything with a method (Object.setProperty(2)), and that method's name should be camel-case, so first char of the method name is always lower case and the first char of each subsequent word starts with a capital (getSomeProperty()). In C#, the first character of a method is expected to be a capital as well, plus they allow and in fact recommend you to access properties seemingly directly, because below the surface you're actually using a method. You'd access "Object.SomeProperty" to get the property (note the absence of the () at the end of that) and in the defenition of Object you'd have, say, "String SomeProperty { get; set; }" where the stuff between the curly braces is the methods for getting and setting. It's short-hand and you're allowed to use regular methods for this, but in C# when you access a property, you're expected to do so in this fashion.

Chapter 4. In java, a class can be inside a package, which you provide on the first line. Aside from the advanced topic of inner classes, it's 1 file-1 class. In C# it's not a package but a namespace. They look the same and you use them for the same thing. In C# it's 1 file-multiple classes but again aside from inner classes I've rarely seen this used in practice. C# will look a bit strange compared to java because the namespace starts a block meaning you'll indent. Then you define the class which is another block meaning you'll indent again.

Chapter 5. To make decisions means the use of "if-elseif-else", which works identically in C#. Same with a "switch" statement although Java is more restrictive about what can be provided as the switch value (like only recent Java versions allow you to switch on a string).

Chapter 6. This is loops: "for", "do-while" and "while". Java and C# are identical here.

Chapter 7. An array is a bunch of the same thing. Java and C# use them in the same way. And while it's nice to know about them, Collections and their ilk are more valuable, but I guess that's for a the next course. This is also where Java and C# diverge quite a bit with regards to how things are called (Map vs Dictionary for instance).

In all, I don't think you're as hopelessly behind as you might think. And from where you are right now C# will probably quite easy to pick up on. If you had an extra year of Java and then switched to C#, you'd be in a lot worse place.

Holler if you need any help.

Link to comment
Share on other sites

C# and Java are very close languages. Right out of highschool I got a job programming in C# having never written a line of C# before but coming from Java it was super easy.

Link to comment
Share on other sites

For *any* folks learning to program, or learning a new programming language:

I've been a professional dev for a lo-o-ong time, and for all my career the folks at ACCU (http://accu.org) have always been helpful. It's mostly focussed on C and C++, but there's a bunch of Python, C#, Java, Groovy, Ruby and other stuff too. It's a mailing list rather than a load of forums (like this) which is free to post to, but they have magazines for members. It's based in the UK, and it's ~50gbp per year, so it's inexpensive. The magazines are excellent quality too; you can view the Overload PDF online here: http://accu.org/index.php/journal

They run an annual conference in the UK, which I've also been to several times. It's a great conference, and also not nearly as expensive as most of the cybersec ones :)

Registration for April 2016 is currently open, see the website.

Link to comment
Share on other sites

Cool! I didn't know about these guys. It's a shame their con is also very C/C++ focussed or I would've had very little trouble convincing my boss to let me go there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...