So I finally asked that potential employer, as nicely as I could, "why not switch from VB.NET to C#"?
First it turns out I wont be working with either language, but they're just really deeply rooted in VB.NET. Then they got in a fun argument with each other about the differences between the two for a couple of minutes.
There isn't any differences. Well I mean, there is. But VB.NET is just another language that hops on top of the .NET metalanguage. So, we're talking syntax differences (and a few minor things from a carryover from VB). It is, for all intents and purposes a wrapper language for C#, which is their flagship .NET language.
This is why you could take any .NET encoded bytecode files and transform them between C#, VB.NET and C++.NET in reflector no matter which language it was compiled in originally.
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 Flash CS 6 came out with a Canvas exporter, and it's (mostly) awesome.
85% of Flash's timeline animation capabilities now available on heavily optimized canvas javascript.
0
Options
jackalFuck Yes. That is an orderly anal warehouse.Registered Userregular
I don't think there's much excuse for any .Net developer not to be a polyglot program. If you know C# or VB.Net you already know the other language, you just may not know it yet. There's more of a cost to move to IronPython and F#, but the rewards are greater as well. As a bonus it is a pretty gentle introduction to Python and Ocaml without worrying about learning a new set of libraries.
I don't think there's much excuse for any .Net developer not to be a polyglot program. If you know C# or VB.Net you already know the other language, you just may not know it yet. There's more of a cost to move to IronPython and F#, but the rewards are greater as well. As a bonus it is a pretty gentle introduction to Python and Ocaml without worrying about learning a new set of libraries.
Mostly this. .NET is more of an API framework, so, knowing the syntax of both it's pretty easy to go between them because you know System.Windows.Forms contains a MessageBox class. The only difference is how you call it which is almost identical between the two. Largest difference between the two is array subscript, aside from just general language stylization.
C++.NET has a bit more to it than VB or C#, having to interface with both the CLR and C++ STD/ISO thingamajibbers.
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
Almost every .NET programmer I've ever met has been brutally entrapped in C#, and speaks as though they legitimately do not even understand how other programming languages function.
Almost every .NET programmer I've ever met has been brutally entrapped in C#, and speaks as though they legitimately do not even understand how other programming languages function.
We can say that about a lot of programmers. Most of my classmates didn't really understand bit/byte and how it works with memory either. Code monkeys I guess?
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
Almost every .NET programmer I've ever met has been brutally entrapped in C#, and speaks as though they legitimately do not even understand how other programming languages function.
This isn't a .NET issue, this is a programmer issue. More specifically a below average programmer issue.
Also, people forget IronRuby as a viable .NET language. Since it's written on literally the same back end as IronPython (Microsoft's DLR), and is hosted in the same code repository, this is shameful.
I bet I've told this here before, but, yes, I've had to deal with someone who did just that.
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
Options
GnomeTankWhat the what?Portland, OregonRegistered Userregular
Ugg, speaking of developer horror. We have a guy here at work who is sort of the missile silo developer of one part of our app. He's the only person who works on it, he doesn't really understand .NET that well, but thinks he's the shit. Lets list off the stupid shit this guy has done:
* Created his own serialization engine, because the .NET one "isn't good", whatever the fuck that nebulous term means.
* Writes big chunks of his code in C style static methods that take contexts as an argument. You know, sort of like what we do with classes and the concept of fucking 'this', only not.
* Created a service call which takes a list of objects, and actually has different behavior based on the number of objects in that list, creating a method that you can't correctly predict the results of without looking at the implementation.
* Refuses to give us an API For the above that allows us to batch send, no. We must call that horrible API once for every item, to hell with the number of SOAP envelopes, responses, and requests that fires up to do a single channel call.
I could go on for hours. I want to ring this guys neck.
Anyone have any suggestions for super fast pdf creation? Our first pass was at using pdflatex, the tex file is created in 100ms but then pdflatex runs for 30 seconds for a 7 page document. That's far too long. PDF creation isn't something I have dabbled in too much. We're close to saying screw it and just saying rely on the print-friendly view and print to pdf if you really want it.
Anyone have any suggestions for super fast pdf creation? Our first pass was at using pdflatex, the tex file is created in 100ms but then pdflatex runs for 30 seconds for a 7 page document. That's far too long. PDF creation isn't something I have dabbled in too much. We're close to saying screw it and just saying rely on the print-friendly view and print to pdf if you really want it.
I have loved iText. I haven't timed it, but check it out. Great library!
0
Options
Monkey Ball WarriorA collection of mediocre hatsSeattle, WARegistered Userregular
I know pdflatex doesn't take 30 seconds to compile my homework, which is often 8 pages or more. I find that odd.
"I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
Curious what people might suggest for this situation, as I'm not too experienced at more advanced programming techniques:
I'm looking to make a customized scheduling application for a convention I work (volunteer) for. (This year we desperately needed some "collision detection" with regards to event data, not scheduling them against events ran by the same panelists, etc)
Part of the data that will be stored will include the available times of day the panelist(s) can run event. But since there could be between one and multiple valid time blocks in a day, I would need to check against those times for a "collision" when trying to place the event in the scheduling grid. My idea was creating a 24 length array for each day set to 0/1 and when scheduling the event, have it check against that array for valid times.
Does that sound like a good idea, or do you have a better solution? (Will be programming it in C# with WPF)
I'm being told to work on a legacy VB6 app. If I post my address will someone come over and kill me? Something quick and painless would be nice, but I'm not picky.
Anyone have any suggestions for super fast pdf creation? Our first pass was at using pdflatex, the tex file is created in 100ms but then pdflatex runs for 30 seconds for a 7 page document. That's far too long. PDF creation isn't something I have dabbled in too much. We're close to saying screw it and just saying rely on the print-friendly view and print to pdf if you really want it.
@woot427
At my old job I used a Python library called ReportLab. It has both free and paid versions. I don't remember exactly how fast it was, but working from a pure text file source of about 5000 pages that got split into a bunch of 1-10ish page PDFs didn't take more than a couple minutes, from start to finish I think. If your PDFs have images and such I don't know how long it'd be. I never really go the opportunity to do anything fancy with it, but it seemed pretty straightforward.
Tofystedeth on
0
Options
LuvTheMonkeyHigh Sierra SerenadeRegistered Userregular
edited May 2012
OK I've apparently gone braindead re: modules in Python. I'm working on an application centered around Django, and I'm writing some modules to import large amounts of data into the database (SQLite at this point, but it could be anything). I have things structured as such:
Root
.lib/
..synchronizers/
lib and synchronizers are directories under root (being the root of the django site), and each have a blank __init__.py in them. Sitting in the root directory I launch the interpreter and manually add lib/ to sys.path. And yet, when I try to 'import synchronizers' it fails.
Of course it doesn't help that I've never tried to modularize something like this before, so I'm failing rather spectacularly. I've also tried this with synchronizers/ directly under root with no help. The import modules are all sitting under synchronizers/
if you're adding lib/ to your path, you don't need the __init__.py in lib/, but it shouldn't matter
I'm curious how exactly it isn't working. Is import synchronizers giving an ImportError? Or are you expecting the submodules to live in the synchronizers module? (They won't, because synchronizers module is just synchronizers/__init__.py)
End on
I wish that someway, somehow, that I could save every one of us
oh wow I found my compiler book (you know...the dragon book)
I wish that someway, somehow, that I could save every one of us
0
Options
LuvTheMonkeyHigh Sierra SerenadeRegistered Userregular
I'm thinking it should work the same way the default xml package works. /usr/lib/python2.7 is in the pythonpath by default, which has:
xml
.etree
..ElementTree.py
And you can do 'from xml.etree import ElementTree' and you get all the functions. My goal is to make it so I have a sync.py on the root that goes something like 'from lib.synchronizers import *' and then loop through the loaded modules and execute the sync() or whatever function in each.
You should probably read the documentation on modules and packages.
If you use "from xml.etree import ElementTree" you only have the ElementTree name in your namespace. To use something in that module, you would have to refer to it via ElementTree, "ElementTree.XMLParser.
If you want to load the names in that package or module into the current (probably global) namespace with something like "from xml.etree.ElementTree import *", you need to define the "__all__" variable, which should be a list containing all the public symbols in a module or package. If it's for a package (a.k.a. a directory), then it needs to be defined in __init__.py.
Rollers are red, chargers are blue....omae wa mou shindeiru
0
Options
LuvTheMonkeyHigh Sierra SerenadeRegistered Userregular
Aha! __all__ seems to be where I need to go next. But first, kebabs.
LuvTheMonkeyHigh Sierra SerenadeRegistered Userregular
The kebabs didn't help. The behavior is most strange:
Starting at my django project's base directory, I can enter the interpreter and run 'from blahblah import models' and it imports my models definition file (stored in blahblah/ of course). As I understand it, the interpreter automatically adds the current working directory as part of the module search path, so this makes sense. As far as I can tell, this directory is not otherwise listed in the import path, and $PYTHONPATH is not defined.
I then change into the lib directory and start the interpreter, but when i run 'from synchronizers import blahblahblah' it errors out me with 'No module named synchronizers'. The very strange part is that I can copy the synchronizers directory into /usr/lib/python2.7/site-packages (also on the module search path) and the same error occurs, but I can import anything else stored in site-packages (nothing installed there, at least to my eyes, is set up any differently than my attempt).
Have to write up a bug report before I move to my new project. Basically I have to write down the problem, the fix, and the prevention of the bug. There are 66 bugs that I fixed in this iteration. This is going to take forever.
Posts
There isn't any differences. Well I mean, there is. But VB.NET is just another language that hops on top of the .NET metalanguage. So, we're talking syntax differences (and a few minor things from a carryover from VB). It is, for all intents and purposes a wrapper language for C#, which is their flagship .NET language.
This is why you could take any .NET encoded bytecode files and transform them between C#, VB.NET and C++.NET in reflector no matter which language it was compiled in originally.
85% of Flash's timeline animation capabilities now available on heavily optimized canvas javascript.
Mostly this. .NET is more of an API framework, so, knowing the syntax of both it's pretty easy to go between them because you know System.Windows.Forms contains a MessageBox class. The only difference is how you call it which is almost identical between the two. Largest difference between the two is array subscript, aside from just general language stylization.
C++.NET has a bit more to it than VB or C#, having to interface with both the CLR and C++ STD/ISO thingamajibbers.
Directory matching is one of the defacto reasons to use recursion, do you need to use iterative looping?
No, I don't need to use an iterative.
We can say that about a lot of programmers. Most of my classmates didn't really understand bit/byte and how it works with memory either. Code monkeys I guess?
http://www.exampledepot.com/egs/java.io/TraverseTree.html?l=rel
Try that?
This isn't a .NET issue, this is a programmer issue. More specifically a below average programmer issue.
Also, people forget IronRuby as a viable .NET language. Since it's written on literally the same back end as IronPython (Microsoft's DLR), and is hosted in the same code repository, this is shameful.
Generally you put business logic separate from UIs and develop them separate. But you've heard this before.
We don't like your kind around here...corrupting people with your talk of separation of concerns and layered architecture.
that's the inefficient way of doing things
I bet I've told this here before, but, yes, I've had to deal with someone who did just that.
* Created his own serialization engine, because the .NET one "isn't good", whatever the fuck that nebulous term means.
* Writes big chunks of his code in C style static methods that take contexts as an argument. You know, sort of like what we do with classes and the concept of fucking 'this', only not.
* Created a service call which takes a list of objects, and actually has different behavior based on the number of objects in that list, creating a method that you can't correctly predict the results of without looking at the implementation.
* Refuses to give us an API For the above that allows us to batch send, no. We must call that horrible API once for every item, to hell with the number of SOAP envelopes, responses, and requests that fires up to do a single channel call.
I could go on for hours. I want to ring this guys neck.
Sadly, with the amount of beard you would have to contend with, this would prove impossible.
Are you invoking natural selection to explain the neckbeards?
Clearly fire is the only alternative.
Why yes. Yes I am.
I have loved iText. I haven't timed it, but check it out. Great library!
I'm looking to make a customized scheduling application for a convention I work (volunteer) for. (This year we desperately needed some "collision detection" with regards to event data, not scheduling them against events ran by the same panelists, etc)
Part of the data that will be stored will include the available times of day the panelist(s) can run event. But since there could be between one and multiple valid time blocks in a day, I would need to check against those times for a "collision" when trying to place the event in the scheduling grid. My idea was creating a 24 length array for each day set to 0/1 and when scheduling the event, have it check against that array for valid times.
Does that sound like a good idea, or do you have a better solution? (Will be programming it in C# with WPF)
http://www.youtube.com/watch?v=nUo8W_tbGtE
At my old job I used a Python library called ReportLab. It has both free and paid versions. I don't remember exactly how fast it was, but working from a pure text file source of about 5000 pages that got split into a bunch of 1-10ish page PDFs didn't take more than a couple minutes, from start to finish I think. If your PDFs have images and such I don't know how long it'd be. I never really go the opportunity to do anything fancy with it, but it seemed pretty straightforward.
lib and synchronizers are directories under root (being the root of the django site), and each have a blank __init__.py in them. Sitting in the root directory I launch the interpreter and manually add lib/ to sys.path. And yet, when I try to 'import synchronizers' it fails.
Of course it doesn't help that I've never tried to modularize something like this before, so I'm failing rather spectacularly. I've also tried this with synchronizers/ directly under root with no help. The import modules are all sitting under synchronizers/
I'm curious how exactly it isn't working. Is import synchronizers giving an ImportError? Or are you expecting the submodules to live in the synchronizers module? (They won't, because synchronizers module is just synchronizers/__init__.py)
And you can do 'from xml.etree import ElementTree' and you get all the functions. My goal is to make it so I have a sync.py on the root that goes something like 'from lib.synchronizers import *' and then loop through the loaded modules and execute the sync() or whatever function in each.
If you use "from xml.etree import ElementTree" you only have the ElementTree name in your namespace. To use something in that module, you would have to refer to it via ElementTree, "ElementTree.XMLParser.
If you want to load the names in that package or module into the current (probably global) namespace with something like "from xml.etree.ElementTree import *", you need to define the "__all__" variable, which should be a list containing all the public symbols in a module or package. If it's for a package (a.k.a. a directory), then it needs to be defined in __init__.py.
Starting at my django project's base directory, I can enter the interpreter and run 'from blahblah import models' and it imports my models definition file (stored in blahblah/ of course). As I understand it, the interpreter automatically adds the current working directory as part of the module search path, so this makes sense. As far as I can tell, this directory is not otherwise listed in the import path, and $PYTHONPATH is not defined.
I then change into the lib directory and start the interpreter, but when i run 'from synchronizers import blahblahblah' it errors out me with 'No module named synchronizers'. The very strange part is that I can copy the synchronizers directory into /usr/lib/python2.7/site-packages (also on the module search path) and the same error occurs, but I can import anything else stored in site-packages (nothing installed there, at least to my eyes, is set up any differently than my attempt).
Maybe I need sleep.
Has anyone checked it out yet? I'm pretty excited.