Comment Re:Private? (Score 1) 67
Why? CDN companies like Akamai spend huge amounts on their server networks, and they are already local to you.
Why? CDN companies like Akamai spend huge amounts on their server networks, and they are already local to you.
App inventor from MIT labs lets you preview on your actual mobile device.
Intellisense *almost* works flawlessly. The times when it doesn't show properties that I know exist drive me bananas.
The unit testing changes from VS 2010 to VS 2012 were quite confusing and a big step down in usability. Wasn't even at an ok level until update 2.
Depends on your context a bit. When dealing with automatically binding form fields to a view model like with an MVC
The syntactic overhead in C# is at least lighter than Java/C++. It's just Foo.Bar == 'something' or Foo.Bar = 'thing', you just have to declare Bar with a {get; set; }
No good reason I shouldn't be able to shoot laser beams out of my eyes either. But I can neither change how an attribute is accessed in Java/.Net nor shoot laser beams out of my eyes.
About the only thing a getter and setter offers is an advantage of doing something before / after accessing the variable for a read / write operation... which breaks the objected oriented mentality.
How does it do that? A form might pass over [date] [time] [timezone] and my object might have [utc_datetime]. The setters for date, time, and timezone set private variables that i don't care about individually. And my getter for utc_datetime will stick date and time together, then look at the timezone and the date and figure out what amount of hours to add or subtract, and return the utc_datetime. But only in cases where the calling code actually ends up requesting it. Otherwise that calculation can be skipped.
There is a product by a company called Xamarin that lets you write C# and compile it for many platforms - iOS, Android, Mac, and Windows. You can either develop in their IDE, or treat their product as a plugin to Studio.
There's also Mono. The ServiceStack web services framework is completely portable between windows and mono on linux.
Or you can use PyTools (http://pytools.codeplex.com/) to write python.
It's still predominantly used for Windows. But the other opportunities are much more than they used to be.
Not mentioned in the other responses is the opportunity to use the "resource acquisition is initialization" or "lazy loading" pattern. You may have a field that gets populated by a relatively expensive operation like a database query. So your options are to fill it in during the object initialization. Or to have a get method that will check whether the private variable it exposes has a value yet. If not it goes and fills it in and then returns it. If you access that field in ~50% of your uses of the object you've saved a ton of database queries. The the calling code just uses CompanyConfig.AllowSomeOption freely.
That requires you to actually code that of course. The automatic get/set is just giving you the opportunity to do stuff like that. Once your class has exposed a public int MyField; you really can't come back later and change that. But exposing a public int MyField {get; set;} lets you come back and fill in the get/set logic when needed
The automated get/set provides the ability to come back later and add your own custom get/set functions. Knowing that 90% of the time you never will. But if you do come back and do it, you have to do the whole shebang - declare your private variable and have the get and set operate on that variable. I believe the need for an explicit common private variable to use in both of them is why you can't leave one as automatic
"One full-time Java programmer told me that he hasn’t had to manually type in any setters and getters in years, and he has a template from which all his objects are typed in automatically, thanks to the code snippet tools in his favorite editor (which isn’t Eclipse—he uses IntelliJ). Clearly, methods of automated typing seem to be a favorite among a lot of programmers. So why did Visual Studio remove a feature that facilitated this? Who knows."
Let's not mention the fact that in C# you don't need to manually type in all the getter/setter junk, just public int MyField {get; set;}
Yes. I have a set of very clever glasses with strips of duct tape over them that block out all the ads while I read magazines.
I prefer to keep my electronics out of the bathroom though, where all of my quality magazine reading happens.
Are you kidding? It takes a screwdriver and 5 minutes. Pull up next to an innocent car. Swap it's plates with the plates on your stolen car. Now the innocent car sets off the camera warnings. Repeat daily.
You have to ask yourself if you really want 100% automated, ubiquitous enforcement of every law in existence. How many laws apply to you right now? You really have no way of knowing.
Lots of folks confuse bad management with destiny. -- Frank Hubbard