Prototypal inheritance can suck a big one. Okay maybe it makes sense for a minimal language, but from a productivity standpoint it just gives me a headache and leaves me with no obvious recourse for duplicating the most powerful features of OOP, or at least in any way that I can figure out what the fuck is going on. (With any other language, the answer is usually to forget about what you know and play to that language's strengths. The cool thing about javascript is it has no strengths.)
Prototypal inheritance can suck a big one. Okay maybe it makes sense for a minimal language, but from a productivity standpoint it just gives me a headache and leaves me with no obvious recourse for duplicating the most powerful features of OOP, or at least in any way that I can figure out what the fuck is going on. (With any other language, the answer is usually to forget about what you know and play to that language's strengths. The cool thing about javascript is it has no strengths.)
It does have at least one strength: excellent and natural threading and events.
Most games are not C#. In fact I challenge anyone to find a serious retail-shelf game written in C#.
And then check to see if it was published by Microsoft.
Well, like Duckling said it is used in XNA development, but even Microsoft won't use it for major games. Also, every developer position I've ever seen for game companies has wanted C/C++ experience but never C#
From as far as I can tell, the only part of most modern games that's written in .NET is the launcher. After that it's off to the native exes.
That said, there is no reason why a hobbyist programmer can't program in with .NET over native. The only real benefit is speed, but, it may not be worth it to learn all that underlying bullshit to get to that point. Especially if you want to use networking.
bowen on
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
0
HalibutPassion FishSwimming in obscurity.Registered Userregular
edited July 2010
As far as I'm concerned, javascript has 2 awesome features.
The fact that it's a standard in all modern web browsers (minor vendor-specific differences aside), so you don't have to depend on your users installing some plugin to make your app work.
Prototypal inheritance can suck a big one. Okay maybe it makes sense for a minimal language, but from a productivity standpoint it just gives me a headache and leaves me with no obvious recourse for duplicating the most powerful features of OOP, or at least in any way that I can figure out what the fuck is going on. (With any other language, the answer is usually to forget about what you know and play to that language's strengths. The cool thing about javascript is it has no strengths.)
This is why one uses a framework that does the dirty work of coaxing prototypal inheritance into a more normal hierarchical form of inheritance....
No one codes straight JS, unless it's for something small. Frameworks exist to remove cross-browser bullshit issues and provide functionality (like 'normal' OOP) you just can't get out of the box. Learn to love them.
Nightslyr on
PSN/XBL/Nintendo/Origin/Steam: Nightslyr 3DS: 1607-1682-2948 Switch: SW-3515-0057-3813 FF XIV: Q'vehn Tia
0
DVGNo. 1 Honor StudentNether Institute, Evil AcademyRegistered Userregular
edited July 2010
Any iOS developers know where I can find a decent example on fetched properties?
Coding Javascript without jquery/prototype is like writing C without standard libraries, Python without imports, etc.
Sure you could probably do it but why the fuck would you. Just use them!
My latest hobby project is possible only due to jquery, fuck trying to get this working in the major browsers without it. I still have to add a few exceptions for IE.
Prototypal inheritance can suck a big one. Okay maybe it makes sense for a minimal language, but from a productivity standpoint it just gives me a headache and leaves me with no obvious recourse for duplicating the most powerful features of OOP, or at least in any way that I can figure out what the fuck is going on. (With any other language, the answer is usually to forget about what you know and play to that language's strengths. The cool thing about javascript is it has no strengths.)
This is why one uses a framework that does the dirty work of coaxing prototypal inheritance into a more normal hierarchical form of inheritance....
No one codes straight JS, unless it's for something small. Frameworks exist to remove cross-browser bullshit issues and provide functionality (like 'normal' OOP) you just can't get out of the box. Learn to love them.
I use dojo. It's nice. It's not as nice as having real inheritance, since methods can still break in fantastic ways by being called in a context other than the owner object, and the meaning of "this" is constantly changing when using inline objects and functions.
I kind of hate prototype. Out of all the libraries out there, it seems to offer the messiest API and least improvement over "vanillia" JS for the most download size.
Coding Javascript without jquery/prototype is like writing C without standard libraries, Python without imports, etc.
Sure you could probably do it but why the fuck would you. Just use them!
My latest hobby project is possible only due to jquery, fuck trying to get this working in the major browsers without it. I still have to add a few exceptions for IE.
Pfft, it's not programming unless you write your own C library... and your own window manager, filesystem, device drivers and OS!
Coding Javascript without jquery/prototype is like writing C without standard libraries, Python without imports, etc.
Sure you could probably do it but why the fuck would you. Just use them!
My latest hobby project is possible only due to jquery, fuck trying to get this working in the major browsers without it. I still have to add a few exceptions for IE.
I don't really care for jQuery, but I do like how is it is to bind elements and send off an ajax request. Now I just have to figure out how to store the results of the request for later inspection...
I like jQuery because of how it simplifies javascript programming at the same time as adding a bunch of great functionality, but jQuery UI is pretty bad compared to the competition IMHO.
I haven't done a lot of JS UI work. What are some good non-jQuery UI frameworks?
Since we're on javascript, does anyone know how to do Google Data API authentication from javascript? I know there's a library for it in java, but I'm pretty lost as to how this is supposed to work in JS.
I like jQuery because of how it simplifies javascript programming, but jQuery UI is pretty bad compared to the competition IMHO.
Yeah, I took a look at it and rolled my own.
This. When I find myself needing some sort of JS UI widget, my instinct has become to roll my own using jQuery. If you take the time to make 'em fairly generalizable when you're first writing 'em, you find yourself with a pretty good stockpile of reusable elements.
I like jQuery because of how it simplifies javascript programming, but jQuery UI is pretty bad compared to the competition IMHO.
Yeah, I took a look at it and rolled my own.
This. When I find myself needing some sort of JS UI widget, my instinct has become to roll my own using jQuery. If you take the time to make 'em fairly generalizable when you're first writing 'em, you find yourself with a pretty good stockpile of reusable elements.
Yeah, with HTML/CSS and the jquery builtins for effects where needed, it's straightforward to define most things and just the way you want them.
That sounds like a lot of work to me. That's why I use dojo. I have enough work just sorting out the conceptual mishmash of markup, script, and server interface.
Lately I've been using Google Web Toolkit at work, and I have to say I quite like it. It's not quite as polished as jQuery at doing animations and stuff, but man, it's nice having true Java-style object orientation. It's so much easier to be organized with it.
As a former javascript guy I will side with the sentiment that most of the UI frameworks are bad.
any UI framework will, in general, just spit out the same 5 or 6 effects in some different combinations, which can be easily replicated and faster, more suited to the task.
I'll be a rebel here and suggest that Adobe Spry actually has the most creative and expansive interface framework.
The only downside is that it is among the most gigantic in file weight and also the one that receives the fewest updates.
Also I believe it runs off of Scriptaculous, which doesn't play nice with jQuery.
Another case of Adobe squandering opportunity in a market it could actually lead in.
and as a final sidenote: jQuery is nice, but poorly used jQuery is devastating to the speed of an app. I've found that the more I learned about core javascript, the more ridiculous many aspects of jQuery seemed outside of the core selector suite.
As a former javascript guy I will side with the sentiment that most of the UI frameworks are bad.
any UI framework will, in general, just spit out the same 5 or 6 effects in some different combinations, which can be easily replicated and faster, more suited to the task.
I'll be a rebel here and suggest that Adobe Spry actually has the most creative and expansive interface framework.
The only downside is that it is among the most gigantic in file weight and also the one that receives the fewest updates.
Also I believe it runs off of Scriptaculous, which doesn't play nice with jQuery.
Another case of Adobe squandering opportunity in a market it could actually lead in.
and as a final sidenote: jQuery is nice, but poorly used jQuery is devastating to the speed of an app. I've found that the more I learned about core javascript, the more ridiculous many aspects of jQuery seemed outside of the core selector suite.
Really all Javascript needs to make my code manageable is (mostly) browser agnostic features. I don't have to worry about which browser it is for my accessing of a CSS attribute, or to hook an event function, etc. etc.
The development time and readability is magnitudes better than how it used to be without the basic js frameworks out there. I actually remember some of my sites that detected between IE and Netscape, feature-wise.
If I look at the source code for some open-source projects to find out how they solved a problem, then used their solutions (but not their implementation, if that makes sense) in my code, would that constitute a derivative work under the terms of the GPL? I don't want to copy and paste their code, I just want to know how they did it and see if a similar solution would work in my project.
If I look at the source code for some open-source projects to find out how they solved a problem, then used their solutions (but not their implementation, if that makes sense) in my code, would that constitute a derivative work under the terms of the GPL? I don't want to copy and paste their code, I just want to know how they did it and see if a similar solution would work in my project.
I imagine it would. However, what kind of application is your end?
bowen on
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
If you were taking a programming class, were stuck on a problem, and looked at open source projects to see how they solved it without actually copying their implementation, would that constitute cheating? I suspect the two have pretty much the same answer.
I personally wouldn't care if someone copied part of my program's back end, as long as the new program wasn't actually trying to compete with mine functionality-wise in any way.
If I look at the source code for some open-source projects to find out how they solved a problem, then used their solutions (but not their implementation, if that makes sense) in my code, would that constitute a derivative work under the terms of the GPL? I don't want to copy and paste their code, I just want to know how they did it and see if a similar solution would work in my project.
I imagine it would. However, what kind of application is your end?
Ideally, commercial, though that's really just a pipe dream at this point.
EDIT: I'm aware I could do this and release a commercial product under the GPL, but I don't really want to go that route.
If I look at the source code for some open-source projects to find out how they solved a problem, then used their solutions (but not their implementation, if that makes sense) in my code, would that constitute a derivative work under the terms of the GPL? I don't want to copy and paste their code, I just want to know how they did it and see if a similar solution would work in my project.
I imagine it would. However, what kind of application is your end?
Ideally, commercial, though that's really just a pipe dream at this point.
Hmm, commercial is different. I'd suggest getting all of your plagiarism out of the way now, so that when you're trying to make a profit, you can honestly claim to be building off of your own experience.
You can use it, just give credit where it's due, and I think in terms of GPL, you have to include the original source code that you used. If it's a unique solution. If it's a way to implement a doubly linked list in memory, fuck, you'll have to worry about competing with LSI for the patent rights for that. I mean, you'll probably have more luck doing some google searches for the exact type of algorithm you want to use and look at a code-project page.
bowen on
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
That's LGPL I think. But I think the newest version of GPL makes a distinction that you don't have to virally give out your source code as long as you document and give credit.
bowen on
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
So, in general, probably not, although you might find a way around it. Specifically from the third one (which is exactly this case), "The fact that proprietary module A communicates with GPL-covered module C only through X11-licensed module B is legally irrelevant; what matters is the fact that module C is included in the whole. "
You don't have to give credit to anyone for just using the same approach or algorithm to a programming problem. As long as you don't copy the code, copyright does not apply. The idea that algorithms or mathematics can be proprietary is a silly thing that people in the GPL world are fighting against, not for. Software patent cases against small companies are unheard of as far as I know.
The 'viral' nature of the GPL was a necessity at the time it was created, much like books, code had the danger of being lost over time. People still distributed everything as a binary since the source code was so huge in comparison. It was designed to make immortal, free code, basically.
Well, regardless of the necessity of it's viral nature at creation, every subsequent version has also included those provisions. Personally, I just don't use anything under the full GPL license and any code I write and want to explicitly be open source is just under the New BSD license.
So C# question; having issues with changing a Form element, say a label, from outside the forms class.
If I have class 'form' and class 'a', how can class 'a' modify form.label.text?
If I make a new 'form' object in class a, and set label.text, nothing happens because it's a new form object...
So how can you pass the label.text from class a, to the existing form object???
Does that make sense?
I was able to accomplish it by using Controls.Find, but that seems rather cumbersome...
Posts
my js fu is weak
"If you're going to play tiddly winks, play it with man hole covers."
- John McCallum
Prototypal inheritance can suck a big one. Okay maybe it makes sense for a minimal language, but from a productivity standpoint it just gives me a headache and leaves me with no obvious recourse for duplicating the most powerful features of OOP, or at least in any way that I can figure out what the fuck is going on. (With any other language, the answer is usually to forget about what you know and play to that language's strengths. The cool thing about javascript is it has no strengths.)
It does have at least one strength: excellent and natural threading and events.
From as far as I can tell, the only part of most modern games that's written in .NET is the launcher. After that it's off to the native exes.
That said, there is no reason why a hobbyist programmer can't program in with .NET over native. The only real benefit is speed, but, it may not be worth it to learn all that underlying bullshit to get to that point. Especially if you want to use networking.
This is why one uses a framework that does the dirty work of coaxing prototypal inheritance into a more normal hierarchical form of inheritance....
http://mootools.net/
http://www.prototypejs.org/
No one codes straight JS, unless it's for something small. Frameworks exist to remove cross-browser bullshit issues and provide functionality (like 'normal' OOP) you just can't get out of the box. Learn to love them.
Switch: SW-3515-0057-3813 FF XIV: Q'vehn Tia
Coding Javascript without jquery/prototype is like writing C without standard libraries, Python without imports, etc.
Sure you could probably do it but why the fuck would you. Just use them!
My latest hobby project is possible only due to jquery, fuck trying to get this working in the major browsers without it. I still have to add a few exceptions for IE.
I use dojo. It's nice. It's not as nice as having real inheritance, since methods can still break in fantastic ways by being called in a context other than the owner object, and the meaning of "this" is constantly changing when using inline objects and functions.
I kind of hate prototype. Out of all the libraries out there, it seems to offer the messiest API and least improvement over "vanillia" JS for the most download size.
Pfft, it's not programming unless you write your own C library... and your own window manager, filesystem, device drivers and OS!
yay, I don't feel like such a loser
it has a pretty datagrid
"If you're going to play tiddly winks, play it with man hole covers."
- John McCallum
I don't really care for jQuery, but I do like how is it is to bind elements and send off an ajax request. Now I just have to figure out how to store the results of the request for later inspection...
In case you are working with PHP take a look at:
http://code.google.com/p/facebook-fbml-writer/
Watched the guy's (Paterlini) conference in Argentina trough the web. I can see where the troubles come from.
"We have years of struggle ahead, mostly within ourselves." - Made in USA
Yeah, I took a look at it and rolled my own.
Switch: SW-3515-0057-3813 FF XIV: Q'vehn Tia
Since we're on javascript, does anyone know how to do Google Data API authentication from javascript? I know there's a library for it in java, but I'm pretty lost as to how this is supposed to work in JS.
edit:
wait, this looks promising: http://code.google.com/apis/gdata/docs/auth/overview.html#ClientLogin
This. When I find myself needing some sort of JS UI widget, my instinct has become to roll my own using jQuery. If you take the time to make 'em fairly generalizable when you're first writing 'em, you find yourself with a pretty good stockpile of reusable elements.
Yeah, with HTML/CSS and the jquery builtins for effects where needed, it's straightforward to define most things and just the way you want them.
This one may be more of an edge case though since it's a game-like UI, more flash-without-the-flash.
any UI framework will, in general, just spit out the same 5 or 6 effects in some different combinations, which can be easily replicated and faster, more suited to the task.
I'll be a rebel here and suggest that Adobe Spry actually has the most creative and expansive interface framework.
The only downside is that it is among the most gigantic in file weight and also the one that receives the fewest updates.
Also I believe it runs off of Scriptaculous, which doesn't play nice with jQuery.
Another case of Adobe squandering opportunity in a market it could actually lead in.
and as a final sidenote: jQuery is nice, but poorly used jQuery is devastating to the speed of an app. I've found that the more I learned about core javascript, the more ridiculous many aspects of jQuery seemed outside of the core selector suite.
Really all Javascript needs to make my code manageable is (mostly) browser agnostic features. I don't have to worry about which browser it is for my accessing of a CSS attribute, or to hook an event function, etc. etc.
The development time and readability is magnitudes better than how it used to be without the basic js frameworks out there. I actually remember some of my sites that detected between IE and Netscape, feature-wise.
If I look at the source code for some open-source projects to find out how they solved a problem, then used their solutions (but not their implementation, if that makes sense) in my code, would that constitute a derivative work under the terms of the GPL? I don't want to copy and paste their code, I just want to know how they did it and see if a similar solution would work in my project.
I imagine it would. However, what kind of application is your end?
Is this a project that you're releasing at all? Or personal just?
I personally wouldn't care if someone copied part of my program's back end, as long as the new program wasn't actually trying to compete with mine functionality-wise in any way.
Ideally, commercial, though that's really just a pipe dream at this point.
EDIT: I'm aware I could do this and release a commercial product under the GPL, but I don't really want to go that route.
Hmm, commercial is different. I'd suggest getting all of your plagiarism out of the way now, so that when you're trying to make a profit, you can honestly claim to be building off of your own experience.
I thought you could get around that via dynamic libraries?
i.e. create a dynamic library that is fully GPL, but your app which uses the library dynamically is still happily proprietary?
Or am I thinking of the LGPL instead?
Well here's the appropriate sections of their FAQ:
http://www.gnu.org/licenses/gpl-faq.html#MereAggregation
http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem
http://www.gnu.org/licenses/gpl-faq.html#GPLWrapper
So, in general, probably not, although you might find a way around it. Specifically from the third one (which is exactly this case), "The fact that proprietary module A communicates with GPL-covered module C only through X11-licensed module B is legally irrelevant; what matters is the fact that module C is included in the whole. "
The 'viral' nature of the GPL was a necessity at the time it was created, much like books, code had the danger of being lost over time. People still distributed everything as a binary since the source code was so huge in comparison. It was designed to make immortal, free code, basically.
If I have class 'form' and class 'a', how can class 'a' modify form.label.text?
If I make a new 'form' object in class a, and set label.text, nothing happens because it's a new form object...
So how can you pass the label.text from class a, to the existing form object???
Does that make sense?
I was able to accomplish it by using Controls.Find, but that seems rather cumbersome...