|
methinks you should post this over in the toolshed
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
Through the holy invocation of Node.js and the mystical incantation of npm install socket.io .
|
|
|
|
|
methinks you should post this over in the toolshed
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
That must be one extreme (your post) - Love to hate in my thread below. And I do believe there was some other 'sucks' going on early in the day.
The Lounge, an emotion filled roller coaster
|
|
|
|
|
You're going to hate the love I show for TypeScript here as well. Models and business functions defined with TypeScript; combined with Socket.IO, Mongoose and MongoDB, this is pure goodness.
|
|
|
|
|
Well, I have never had such a headache as over the last week.
Following over from my mild rant at http://www.codeproject.com/Messages/4933791/Does-it-really-have-to-be-this-complicated.aspx[^]
I kept plugging along and eventually got data back to a winforms app over Windows Runtime from Bluetooth GATT messages. 70 bytes of horror chopped into <=20 byte packets.
Anyway, after getting data back, decoding and now understanding the message protocol, it is safe to say, until the official SDK for Windows is released, the beans are going back in their box.
There is just too much flakyness without full official SDK that it is just not worth the effort or the hassle. The SDK is due this month, but imagine the developers must be going through some pain!
Anyway, for anyone who wants to read about the pain, you can catch it in the article at the link below. The page maybe is a bit smudged and damp, but they are just tears and will soon dry
LightBlue Beans - Magic Beans and no beans[talk]?[^]
|
|
|
|
|
yeah, but mate, its all learning
I gave you a '5' for the article anyway, it was up to the usual standard, and just may help someone down the line
|
|
|
|
|
My latest project has been such fun for naming things. It is for submitting property listings (real estate sales) to a web service, but using data I get returned from another web service, so my code's main job is mapping input to output data structures. The required output is a Listing object, for a property, but my mapping code is dealing with lists of Listing properties.
Then, the bulk of data in a Listing object is held in an Attribute array. An attribute is a named value that helps describe a property. But, my property listing properties also have C# attributes. It has taken tremendous effort to overcome the temptation to leave in my wake classes with names like ListingPropertyAttributeList , used in heavily reflection driven code.
|
|
|
|
|
I think you should call a spade a spade. If it's an attribute then call it an attribute.
Brady Kelly wrote: heavily reflection driven
|
|
|
|
|
What's with the over reflection? Must I hard code some 200 assignments from input to output?
Oh, and BTW, you try telling the compiler that "an attribute is an attribute". I didn't choose the elephanting name "Attribute" for use in a .NET class to describe anything but attributes I declare in code.
|
|
|
|
|
Reflection is a tool best used sparingly. If you need it, it's great that it's there, but be sure you really need it.
Brady Kelly wrote: hard code some 200 assignments from input to output
I look for ways to do that and generate code files even before compile time. Not always possible of course, but a Web service shouldn't be throwing surprises at you.
|
|
|
|
|
I normally use it quite sparingly. It's fairly expensive and crosses borders normally in place for god reasons. But this is POC code, so writing a code generator, or even a T4, would take way too much time before I knew it wasn't my data at fault but its destination web service.
The destination web service quite recently built, and still plenty full of surprises. I have no control there.
|
|
|
|
|
Brady Kelly wrote: web service quite recently built
Brady Kelly wrote: full of surprises
|
|
|
|
|
Brady Kelly wrote: normally in place for god reasons Yep, only code GODs dare tread there.
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
Did you think of looking at BizTalk? It might remove the need to code at all!
Life is like a s**t sandwich; the more bread you have, the less s**t you eat.
|
|
|
|
|
PhilLenoir wrote: Did you think of looking at BizTalk? It might remove the need to code at all! Sure, if you have 2 years to learn it.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
And bucks to buy it. This is two tasks, one flow code I've written, and the scenario isn't close to warranting anything as big as BizTalk.
|
|
|
|
|
Brady Kelly wrote: And bucks to buy it. Which you can earn back pretty quickly once you have learned it. We had to contract a Biztalk guy for a few weeks to help us out and they are not cheap.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
or you could've used structuremap[^]
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
It is an IOC tool so there has to be reflection or a massive massive switch case.
ISomething something ;
switch(somethingElse){
case 1: something = new ConcreteOne();
...
}
|
|
|
|
|
no, to both.
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
Under the hood perhaps. How else would you map interfaces to concrete types?
|
|
|
|
|
with code
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
|
*sigh* why don't you download it and try it out and you'll see what I mean.
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|