Open Side Menu Go to the Top

02-01-2014 , 02:38 PM
Quote:
Originally Posted by suzzer99
So just out of curiosity – how do you implement an interface in C++ at runtime?
i haven't used C++ in years, so i don't recall, but Coplien explains how it works in C++ in the talk I got that quote from, so I know it can be done. It's a great talk, if you want to look for it yourself:

http://www.infoq.com/presentations/The-DCI-Architecture

IIRC the answer to your question would be somewhere in the 30 to 45m range.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
02-01-2014 , 04:25 PM
You can probably do this with AOP. Haven't programmed Java in ages and AOP in aeons so dunno offhand how to turn them "on" and "off" (precedence and two aspects probably)

Code:
package astest;

class Programmer{
	String name;
	
	Programmer(String name) {
		this.name = name;
	}
	
	public void thoughts() {
		System.out.println("true OOP is awesome!");
	}
}

public class AspectTest {
	public static void main(String[] args) {
		Programmer p = new Programmer("SomeDude");
		p.thoughts();
		
                //ONOFF here, I'll just have it as always on assuming it can be done :P
		p.thoughtsOnJava();
	}
}
+

Code:
package astest;

public aspect JavaProgrammer {
	public void Programmer.thoughtsOnJava() {
		System.out.println("lols at Java");
	}
}
Could be more elegant by using an aspect to provide an implementation for an interface that Programmer implements etc. but like I said it's been a bit and maybe I'm misremembering and am totally off base.

This is probably cheating though but then again I don't see why I'd want to be able to do this dynamically in a static language in the first place. Java obviously has some OOP shortcomings but it's good enough or can be hacked into submissin if need be (you can probably also fiddle with classloading and other voodoo). I'll watch the talk because it sounds interesting though.
But I mean the question is kind of like asking "why can't I have good static type checking in dynamic language X"

Last edited by clowntable; 02-01-2014 at 04:31 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2014 , 05:06 PM
let me know what you think when you watch the talk.

i think he'd argue that's not a good analogy. the idea is it's not like asking for static typing in a dynamic language, but that if you understand what OO is really about, that this ability is so *fundamental* to the paradigm that it's almost a misnomer to call a language lacking it an OO language, even if that language has other OO trappings like inheritance and polymorphism. personally, i found the argument convincing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2014 , 07:09 PM
Going to watch it tomorrow. I did read the fantastic book by Meyer (best book on OOP) and was in contact with Smalltalk enthusiasts so I think I have a good feeling for what good, pure, elegant whathaveyou OOP is supposed to look like.

My personal opinion these days is that I mostly treat it as an abstraction and not an ideal for programming (since I have been exposed to other paradigms). It's still a very good way of thinking about the world imo

I still enjoy thinking/talking about OOP concepts and elegance quite a bit so really looking forward to it
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2014 , 08:16 PM
Quote:
Originally Posted by alex23
Anyone going over the edx intro to probability? I need a review of it before fall semester.
I'm pretty sure the EdX course is the adoption of this course:

http://ocw.mit.edu/courses/electrica...2010/index.htm

For the most part EdX doesn't like to water down their courses, so you will probably be getting the exact same thing shown here.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2014 , 10:53 PM
Quote:
Originally Posted by gaming_mouse
Do you have any experience with the DCI Architecture itself? I'll need to find another time to watch an hour-long video but read the summary here:

http://en.wikipedia.org/wiki/Data,_c...nd_interaction

And it's interesting but I've never seen this anywhere before. I'm somewhat skeptical that a completely generic architecture like this can be usefully applied to every domain but it seems like they formalized a lot of the ad-hoc rules people use to figure out what should be a class and what its scope should be, then used the formalization to prescribe a general workflow.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2014 , 11:24 PM
There are more examples and implementations of DCI at:

http://fulloo.info/

Looking at the Scala examples, I just don't see it, hate both the completely unnecessary macro implementation and the toy examples. And I find alarming the lack of any actual useful software or framework that uses or enforces this architecture, given how long the proponents have been talking about this. Most software developers don't like reusing generic architectures because bad ones can't understand how and why and good ones like to make their own, more appropriate architectural decisions for the domain at hand. Popular generic architectures like MVC are popular only because they are enforced by framework authors who used the architecture to model the problems solved by the framework. No one's going to use a DCI framework that enforces DCI without solving any actual problems.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-01-2014 , 11:49 PM
candybar,

i'm just learning about it myself (i've read one book and watch 2 long videos) but it is crystallizing a number of concepts that i've been playing with for the last year or more, bringing together insights that i've read piecemeal in many other books, blogs, and videos, and that i've had myself.

as i understand it, MVC is not a good comparison at all. MVC is far more specific. DCI is a much more general approach to doing modelling. that is, it's much more akin to OO itself than it is to MVC or any other specific architecture. You're just talking about modelling the world with objects, roles, and contexts, as opposed to just objects. or said another way: it's regular old OO guided by some special patterns for domain modelling.

beyond that, nothing is imposed on you. sure, there are a few ruby gems that provide syntactic sugar for some of the DCI patterns, but those are optional for doing DCI, like any other gem that makes your life easier. doing DCI in java is the exception, because for the reasons I posted above it actually can't be done in plain old java, but the Qi4J library I believe does some kind of crazy magic to allow it to work.

i could imagine before OO became mainstream that someone might make a similar objection to yours: "I'm somewhat skeptical that a completely generic architecture like objects can be usefully applied to every domain...."
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2014 , 01:48 AM
Quote:
Originally Posted by gaming_mouse
i could imagine before OO became mainstream that someone might make a similar objection to yours: "I'm somewhat skeptical that a completely generic architecture like objects can be usefully applied to every domain...."
Fair enough but the form of OO that was successful in the marketplace of ideas is classes and objects as a computational/syntactic abstraction for structs, functions and conditionals/lookup-tables, not OO as a software architecture. Most programmers, except when they are answering shape interview questions don't think of objects and classes as meaningful real-world concepts, but rather purely computational constructs with predictable semantics. And it was successful largely because it allowed programmers to express more with less code and provided convenient syntax for common computational patterns demanded by programmers. Also, most people learned OO because they had to use C++/Java, which solved far more problems than just enabling OO, not the other way around, just like how people learned MVC because they had to learn Swing or Rails or Angular. You need a killer app no matter what.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2014 , 01:53 AM
Another thought is that lack of common architecture across projects is a specific problem faced by Jim Coplien because he's a consultant and has to move frequently from one project to another and benefits greatly from common generic architecture across projects. When you work on multiple projects, it's a big win for you personally to have projects structured the same way, even if it's less efficient for each of the projects. I try to get every project to use the stock architecture as encouraged by the ecosystem, whether language/framework/libraries/OS and get people to resist temptation to deviate and get fancy. It greatly increases the likelihood that the project can get outside help quickly, not to mention common tools, know-how, wisdom, etc as the ecosystem evolves. But it's questionable to impose an architecture that is common across projects you work on, but isn't at all popular outside of your own projects. A lot of consultants do this, some even carry boilerplate/adhoc-framework that they apply to every project. I don't think they are even trying to be selfish, most people seem to genuinely confuse what's easy for them to understand because they've done it over and over and what's easy for everyone in a vacuum.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2014 , 11:48 AM
i mean, c'mon. you are now criticizing something based on pure speculation about ill-guided personal motivations of one of its proponents. if you're interested, just read the book or watch the video as an intro. this is silly.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2014 , 01:24 PM
gaming_mouse: I watched the first 10 minutes...is the video required at all? If not I'll grab the mp3 and listen to it on the train.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2014 , 03:12 PM
Quote:
Originally Posted by clowntable
gaming_mouse: I watched the first 10 minutes...is the video required at all? If not I'll grab the mp3 and listen to it on the train.
you could get like 80% without the video probably. there are a few points where he shows some diagrams that clarify things -- i think that's all you'd miss.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2014 , 04:22 PM
Quote:
Originally Posted by gaming_mouse
i mean, c'mon. you are now criticizing something based on pure speculation about ill-guided personal motivations of one of its proponents. if you're interested, just read the book or watch the video as an intro. this is silly.
Haha, I digressed quite a bit, didn't I - that part wasn't criticism, just part of a Saturday night rant trying to answer my own question as to why he sees a problem where most people don't and why consultants are always trying to sell us generic architectures and generic methodologies.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2014 , 04:44 PM
i understand the rant as a general rant. fwiw, i don't think it applies at all here. but you shouldn't listen to me or anyone else. just decide if it's intriguing enough to investigate on your own.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2014 , 09:13 PM
Mouse, have you ever seen this key note speech? It's from Rubyconf 2010 by DHH.

It's amazing at how awesome and inspirational DHH is. Somehow he managed to relate blowing people for drug money to monkey patching and it ended up making sense.

One of the best key notes I've ever listened to on any topic.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-02-2014 , 09:19 PM
Shoe,

I have not. I'll add it to my list. Thanks for the link.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-03-2014 , 12:09 AM
Any tips/advice for jr/int c# developer looking for github projects to join to help build a portfolio?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-03-2014 , 03:59 PM
Quote:
Originally Posted by tercet
Any tips/advice for jr/int c# developer looking for github projects to join to help build a portfolio?
Does it have to be C#? There are more open source projects in less proprietary languages lik Java, C++, Javascript, Python etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-03-2014 , 04:15 PM
Quote:
Originally Posted by tercet
Any tips/advice for jr/int c# developer looking for github projects to join to help build a portfolio?
http://blog.smartbear.com/programmin...r-a-rock-star/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-04-2014 , 10:43 PM
"I don't have access to github."

I swear you can't write this stuff.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-04-2014 , 11:50 PM
Well I want to get more into c# stuff for future jobs..

So I figure doing more of that would be better right?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-05-2014 , 04:18 AM
But why chose c#?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-05-2014 , 09:36 AM
For C# projects just poke around codeplex.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-05-2014 , 10:01 AM
Digging through new questions on stackoverflow is painful. As someone who is self taught, it's relatively annoying to see people just go "herp derp my program isn't working, fix it."
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m