Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 368 369 [370] 371 372 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 887307 times)

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5535 on: March 06, 2014, 03:35:14 am »

- Professionally working without IDE is outright impossible.
Depends on what you call "professionally". I currently work in a hacker-culture kind of environment, and use both IDE's and vim, and so does everyone else here. We also make money, for the record :). However, I've also worked in enterprise-sized companies as a code-drone and there you do need an IDE.

... Eclipse, which is the IDE for Java
Opinions differ, IntelliJ is better at Javaing, imho.
Spoiler (click to show/hide)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Mephisto

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5536 on: March 06, 2014, 09:03:22 am »

PyDev is a plugin for Eclipse, which is the IDE for Java. It's fairly good, with debugging and all that. I only ran into problems when debugging external bindings for SFML - other than that is was pretty good!

Ideological stuff ahead. Steer clear if you don't like ideology.


Let me just say that I can't recommend PyDev. The preferred way of using it is to buy a (currently-beta) custom Eclipse. I know they probably have the right to do so, seeing as they haven't gotten sued yet. It still strikes me as icky. I know you can use it with vanilla Eclipse, but that's not exactly a pleasant experience (at least for me).

Plus, it's $50 (beta; will be increased later). I'd rather drop a hundred on PyCharm. The purchasing terms are pretty much identical  between the two, but LiClipse doesn't say how much their renewal fees are.
Logged

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: if self.isCoder(): post() #Programming Thread
« Reply #5537 on: March 06, 2014, 09:46:05 am »

I guess I should check out IntelliJ at some point then :)

Also, PyDev has regular Eclipse plugins by adding one of the URLs to the package listing websites. No need to buy stuff. That's what I've always used, and it worked fine. I'd say trying out a free tool might be better than instantly dropping $100 on another :)

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #5538 on: March 06, 2014, 09:49:59 am »

PyCharm has a free open source Community Edition, the paid version is aimed at developing web applications whilst Python programs in the CE are perfectly doable with all the refactoring features of the paid edition, just without the built in HTML/Javascript/Database Access features.
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #5539 on: March 06, 2014, 09:58:06 am »

std::thread is really awesome. It's a ton better to use than boost::thread in multiple ways. The largest reason it's awesome, though, is that you can actually make pointers to threads and have them work sanely. The last time I used boost::thread, it said that I couldn't make a pointer to a thread, nor a reference to a thread. I needed some sort of boost_shared_pointer<><><dfgapjgrt-43t> thingy.

In std::thread, though, it's simple as

t = new std::thread(&ALMANAC::SoilGrid::stepAll, Grid, weatherdata);

and then do my thing, and after a while I call t->join().

This is the easy kind of multithreading, though, where one thread does its thing and the other thread checks up on the first thread every once in a while to update, say, a progress bar. I'm not touching mutexes or semaphores with a ten-foot pole. >:I
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Mephisto

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5540 on: March 06, 2014, 10:01:15 am »

Also, PyDev has regular Eclipse plugins by adding one of the URLs to the package listing websites. No need to buy stuff. That's what I've always used, and it worked fine. I'd say trying out a free tool might be better than instantly dropping $100 on another :)

PyCharm has a free open source Community Edition, the paid version is aimed at developing web applications whilst Python programs in the CE are perfectly doable with all the refactoring features of the paid edition, just without the built in HTML/Javascript/Database Access features.

I've tried out all of them (PyCharm CE and Pro, Eclipse with PyDev plugin) and Pro was the best fit for myself. I used CE for close to a year so I knew it would be a good  buy.

My day job (my hobby as well, but that's another story) is Django development. I never knew what I was missing until PyCharm autocompleted Bootstrap CSS classes for me. It's just a generally lovely experience. It's not necessary for everyone, but it's pretty nifty if you have a reason to use it.
Logged

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #5541 on: March 06, 2014, 10:28:17 am »

t = new std::thread(&ALMANAC::SoilGrid::stepAll, Grid, weatherdata);

To be fair, you really shouldn't be doing naked storage of pointers and deletes in 99% of Modern C++ development. As in, it's considered flat-out wrong to do so in most scenarios. Either use a std::unique_ptr or a std::shared_ptr. These use RAII to manage the the pointer so you never need to call delete on it yourself.

Remember: The STL uses new and delete so you don't have to.
« Last Edit: March 06, 2014, 10:31:14 am by MorleyDev »
Logged

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5542 on: March 06, 2014, 03:42:11 pm »

That's something I've repeatedly tried to get myself to learn about modern C++ development, but since I already know how raw pointers work, have used them for many years, and always carefully manage their lifetimes in constructors an destructors, it hasn't been a problem for me.  I suspect once I do learn the magic of smart pointers I'll never look back, but since I write so little C++ these days anyway I probably won't learn for a while yet.

Regarding IDEs:

Where I work we do lots of web development.  Pretty run of the mill PHP fed through Apache with lots of client side JavaScript.  In my experience, IDEs aren't all that useful in such an environment.  With PHP for example there's no way (that I'm aware of) to interactively debug a script running in Apache because of a web request, so half the reason to use a graphical IDE is gone right there.  Auto complete and code refactoring are nice, sure, but hardly necessary for the scale of projects we work on.  Syntax highlighting is likewise nice but not necessary.  JavaScript is similar, but is much simpler to debug because mdern browsers include very, very nice JavaScript debuggers.

As a result, two of use just use Notepad++ and the other two use Macs with something called Coda (which I know nothing about).  To be honest, the only reasons I use Notepad++ are because it has a built in FTP client and because of syntax highlighting.  The same reasons I used Dreamweaver before it.  If I lost access to it and had to code in Notepad, I'd manage.  I would code slower, but not a whole lot, and most of my time is spent thinking rather than typing anyway.  Debugging takes up a lot of time and wouldn't be affected.

That's just web development though.  For some languages I would hate to code without an IDE.  C++ is a great example.  I've written code in vi, compiled it with gcc with a manually written makefile and debugged it in gdb, but when you compare my productivity doing that against coding in Visual C++ there is no contest.  The one time I had to write a Java application (for an OS development class no less...) I didn't use an IDE and I thought I was going to go insane trying to figure out how to get things to import correctly.

On a semi-related note: I have learned to really dislike Eclipse.  Maybe it's just because Texas Instruments might not should have used it to build an IDE for their DSPs, and maybe we should be running it on a computer with a bajillion Ghz processor, but it runs extremely slowly, crashes often and has some of the most backward ways of configuring things and managing workspaces that I have ever seen.  Why do I have to enable the C++ includes tab from another window so I can update the include paths?
Logged
Through pain, I find wisdom.

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5543 on: March 06, 2014, 05:27:14 pm »

C++ in Eclipse made me cry.

And that's coming from someone who does PHP in Netbeans for a living.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #5544 on: March 06, 2014, 06:18:26 pm »

Gaze upon it yet mighty and despair!
Spoiler (click to show/hide)

But seriously, the new JetBrains C++ IDE (Early Access only atm) has some problems at the moment. It struggles with partial template specialisation, and can't tell a function isn't recursive if a templated function calls an overload of itself. But early days now, early days...
Logged

gnome42

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5545 on: March 08, 2014, 04:41:03 pm »

They are a tool. 
Unfortunately, they tend to also become a crutch.

Uh, no. While I agree with you on code grinders vs pretty code and everything in your later posts, but... Whatever I kinda need to drop some lines

- IDE have nothing to do with code grinders. Not at all. It's a bad programmer good programmer issue. It's a mind set. I know many bad coders going all dreaded elitist mac + sublime + touchpad +blind typing mode, oh these guys I want throw out of window because how bad they are. Or even more dreaded tree hugging ubuntu + vim elves. They all preaching all bests of their choices on every corner, mind you. They never cease their preaches.

- Reality is, learning coding with IDE is faster simply because IDE will quickly highlight your parse/typo errors without burden of hopping between editor and command line and wasting your time reading error messages and then wasting even more time to align your code with line number, then glance over every word to locate mistake... Well you got what I am talking about?

- Professionally working without IDE is outright impossible. Imagine you have a project with several thousand of files and somebody tasked you with opportunity to refactor some code bits which you can only find with some fulltext search. Now you can do it two ways.
Grep it recursively, regexp or not, edit all that files either by double clicking found filenames (oh touchpaddies, I love you) or be-a-man-hand-tab-typing-full-path-it-like-a-real-hacker then vim it to death without any hope of syntax/sanity/context check then commit everything like a true gosu reading through god awful text diff which tends never to ignore whitespace. And we have a winner. I've seen that once. I wanted to smack that guy into face with his own keyboard. He really really wasted my time while I was patiently waiting behind his chair. I had a feeling one of my spinal bones had a protrusion in process of motionless waiting. And he did just a several typos! What a man. Sublime blind typing, his fingers was lightning. True hero.
Or, alternatively, you can press one hotkey for project search, type in your text/regexp, get a window with matches.. Hmm... That wasnt 30 seconds! That was just a second, because IDE uses fulltext search cache for that tasks. Fine. Now you can click through matches seeing samples of code that matches your pattern and you edit it right away with all syntax/sanity/context check, and then you press one hotkey to look at perfectly sane graphical representation of diff for your commit.

Yeah, that no-IDE guys doesnt cost company a dime...

My co-workers on a regular basis need to deal with  about 45 million lines of code.   It is possible to keep the gist of how it all works in your head.  Not specifics, just the overview.  It is a case of knowing the flow of the data, not the specifics.

These guys are not all wizards.  Some are, some are not.
Could a really good IDE be a boon to some of them?  Yes.
Do some of them need it?  Nope.

Many of them came out of the age when there were no good IDEs.
So it got kept in the head.  It you doubted what was going on, another window got opened.
And a phone call was placed to get a second set of eyes on the code in general.

IDEs can be great.
I will never deny that.
But things get complex enough, and there are some very nasty side effects that take about 4 months to show up that a GUI will never catch.

How do these things get noticed?
Usually when someone gets bit by them at 0300.

Breaking during QA is almost expected.
Not ideal, but if everyone was perfect, QA would not need to exist ( And they need to.  Everyone will make a mistake eventually  ).
Break something in production and you learn.

The mantra in my workplace is "Do not impact the Person On the Street."
We have wiggle room beyond that.


gnome
Logged

gnome42

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5546 on: March 08, 2014, 05:05:09 pm »

A bit of a follow up.

IDEs can be the best thing since sliced bread.
The are great.

Unfortunately, on larger legacy projects you cannot rely on them.

When you can take advantage of IDEs, use them

Be prepared for cases when  the code base is either complex enough, or badly laid out enough that an IDE will just freak out.

The context sensitive features of various IDEs are a boon.
They help with the more simplistic mistakes that eveybody makes eventually.

Write enough code and you will create something complex enough to confuse the IDE.

Understanding how everything works, and the sometimes nasty side effects will only make your life easier.
Logged

alexandertnt

  • Bay Watcher
  • (map 'list (lambda (post) (+ post awesome)) posts)
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5547 on: March 08, 2014, 06:52:41 pm »

If you write something bad enough you will confuse the IDE. (Or if your writing anything and your using MonoDevelop :P)
Logged
This is when I imagine the hilarity which may happen if certain things are glichy. Such as targeting your own body parts to eat.

You eat your own head
YOU HAVE BEEN STRUCK DOWN!

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5548 on: March 09, 2014, 06:20:53 am »

If you write something bad enough you will confuse the IDE. (Or if your writing anything and your using MonoDevelop :P)
I feel like bad code is still very wide-spread, especially in legacy code.
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

alexandertnt

  • Bay Watcher
  • (map 'list (lambda (post) (+ post awesome)) posts)
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #5549 on: March 09, 2014, 06:36:21 am »

I feel like bad code is still very wide-spread, especially in legacy code.

This is true, but in my own experiences you would have to write exceptionally bad code to break a decent IDE.

Then again, I am thinking from the perspective of using languages like C#/Java etc. Its probably easier to break an IDE with more... erm, interesting languages like C/C++
Logged
This is when I imagine the hilarity which may happen if certain things are glichy. Such as targeting your own body parts to eat.

You eat your own head
YOU HAVE BEEN STRUCK DOWN!
Pages: 1 ... 368 369 [370] 371 372 ... 796