Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 683 684 [685] 686 687 ... 795

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

RoguelikeRazuka

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10260 on: December 13, 2016, 06:55:06 pm »

Hey currently I'm implementing an island model (parallel) genetic algorithm for solving task scheduling problem in C#, and I need some help.There are a number of populations each of which is processed by a single thread running a genetic algorithm independently, and it's required that after a certain number of generations passed in each population, the algorithms stopped processing for a moment so that the populations exchanged some of their individuals, and when it's done the populations continued evolving. I'm unsure how to implement this in C#, which classes to use etc

Here's what I've been able to come up with so far:

http://pastebin.com/taqbdV72

But not any thread waits for all the others as I want them to... My (not working) solution is that there is a list of ManualResetEvent objects, each corresponding to a single thread (or a copy of GA), and when it's time for the populations to exchange some of their individuals, a thread, when it has reached this point, says to the other threads it is ready to proceed and waits for the other threads to come up, and when they're all done, the migration routine is performed (I haven't implemented this one yet), but they are not running synchronously after all, as I have already stated.

Could you please look a the code above, starting from line 241, and say what is incorrect there, and how I could fix this? Or should I go with another approach for island GA implementation (in case of C#)? Please note that it's not all the code there is to it.
 
« Last Edit: December 13, 2016, 07:00:49 pm by RoguelikeRazuka »
Logged

Shub-Nullgurath

  • Bay Watcher
    • View Profile
    • Github
Re: if self.isCoder(): post() #Programming Thread
« Reply #10261 on: December 15, 2016, 02:07:08 am »

Stupid xml. Was trying to parse some stuff and it kept skipping over every other entry.

I couldn't work it out until I switched the tag layout from this:
Code: [Select]
<skill_description></skill_description>
To this:
Code: [Select]
<skill_description>
     
</skill_description>

White space affecting the result is exceptionally irritating.

Mephisto

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10262 on: December 15, 2016, 08:07:00 am »

Stupid xml. Was trying to parse some stuff and it kept skipping over every other entry.

I couldn't work it out until I switched the tag layout from this:
Code: [Select]
<skill_description></skill_description>
To this:
Code: [Select]
<skill_description>
     
</skill_description>

White space affecting the result is exceptionally irritating.

Were you using an actual XML library or did you try rolling your own? That sounds like something that should not occur.
Logged

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10263 on: December 15, 2016, 08:24:38 am »

xml and whitespaces are an annoying matter. formatting xml inserts all kind of shit in the output, because nodes get all the added tabulation etc, which counts as text

if you need manual entry, consider yaml or formatted json. otherwise keep it condensed and work out bugs, because arbitrary variable white spaces will come back and bite you
Logged

Spehss _

  • Bay Watcher
  • full of stars
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10264 on: December 16, 2016, 10:14:57 pm »

Visual Studio Community is free to use, right? I finally got it to finish installing and working, but it's saying that the "30 day trial" has expired and I need to create an account to be able to use it.
Logged
Steam ID: Spehss Cat
Turns out you can seriously not notice how deep into this shit you went until you get out.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10265 on: December 16, 2016, 10:20:38 pm »

It's free, but you need to be logged into a microsoft account to  use it.
Logged

Spehss _

  • Bay Watcher
  • full of stars
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10266 on: December 17, 2016, 01:23:21 am »

It's free, but you need to be logged into a microsoft account to  use it.
Ok, so it's free (and open-source according to their website) but I still need to sign up and give them information to be able to use their product? That's dumb.
Logged
Steam ID: Spehss Cat
Turns out you can seriously not notice how deep into this shit you went until you get out.

TheBiggerFish

  • Bay Watcher
  • Somewhere around here.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10267 on: December 17, 2016, 04:04:45 am »

It's free, but you need to be logged into a microsoft account to  use it.
Ok, so it's free (and open-source according to their website) but I still need to sign up and give them information to be able to use their product? That's dumb.
*Make a bunch of fake stuff up and use a disposable email.  None of it is really checked.  They might've sent an activation email, I am unsure.
« Last Edit: December 17, 2016, 04:07:01 am by TheBiggerFish »
Logged
Sigtext

It has been determined that Trump is an average unladen swallow travelling northbound at his maximum sustainable speed of -3 Obama-cubits per second in the middle of a class 3 hurricane.

Shub-Nullgurath

  • Bay Watcher
    • View Profile
    • Github
Re: if self.isCoder(): post() #Programming Thread
« Reply #10268 on: December 17, 2016, 05:11:49 am »

Were you using an actual XML library or did you try rolling your own? That sounds like something that should not occur.

C#'s default XmlElement stuff. The problem is that when I make the Xml reader read the next element it's ignoring the null inside the brackets (despite the fact it should be a null name) and skips to the /end element instead.

nogoodnames

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10269 on: December 17, 2016, 09:25:00 am »

It's free, but you need to be logged into a microsoft account to  use it.
Ok, so it's free (and open-source according to their website) but I still need to sign up and give them information to be able to use their product? That's dumb.

Pretty sure that line about open source is just them saying it's suitable for open source projects. It wouldn't make sense for the IDE to be open source considering that it's basically the same as the professional and enterprise versions with a few less bells and whistles.

I'm almost never logged in while using it. Maybe it just needs to bind to an account after 30 days and you don't need to stay logged in afterward. Just make a burner account if you're that worried about privacy.
Logged
Life is, in a word, volcanoes.
                        - Random human lord

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #10270 on: December 17, 2016, 09:31:01 am »

Visual Studio Community is free to use, right? I finally got it to finish installing and working, but it's saying that the "30 day trial" has expired and I need to create an account to be able to use it.

They do also offer Visual Studio Code as a FOSS IDE. it can do C# but is mostly focused on web development (And is awesome for that, we use VSCode for Javascript/Typescript/Html/CSS/SCSS at work, and Visual Studio for the C# stuff. VSCode is just better for web than Visual Studio, especially when you use it with Typescript 2.1.

JetBrains have also come out with Project Rider (https://www.jetbrains.com/rider/), which is their C# IDE and comes with all the Resharper bells and whistles. It's in EAP at the moment so is free for now.
Logged

inteuniso

  • Bay Watcher
  • Functionalized carbon is the source.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10271 on: December 17, 2016, 04:40:02 pm »

Ziga Sajovic made a differentiation engine for C++. Here's the arXiv abstract and the github link.
Logged
Lol scratch that I'm building a marijuana factory.

Spehss _

  • Bay Watcher
  • full of stars
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10272 on: December 17, 2016, 09:46:37 pm »

Does anyone here have experience with programming professionally? As in you are hired and paid money to write code or other computer science stuff?

I'm taking college courses and getting a degree in compsci, but I really doubt college courses alone are enough prep for competing in the job market. I feel like I don't really know what I'm getting into. Can anyone describe what their work is like, or what the average tasks in a work day would be, or what your employer was looking for when hiring you? I'd like to have a better idea of what I'm actually supposed to be doing in real world applications, not a college environment.
Logged
Steam ID: Spehss Cat
Turns out you can seriously not notice how deep into this shit you went until you get out.

Reelya

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10273 on: December 17, 2016, 11:51:24 pm »

Those things are going to be massively divergent based on what type of industry you're looking to go into. It's kinda too vague to say "programming".

If you're going into corporate business app programming it's more of a 9 to 5 type job, and I'd say you're in for meetings - lots of meetings, and KPIs, performance assessments and the like.

If it's games programming then it's wildly divergent, could be anything from an informal indie 2-3 person gig up to AAA studios with hundreds of team members. And it's project based, so you never know when you're going to get sacked.

Web programming is more in the middle, there are lots of smaller companies doing that for various clients. This is a good thing to aim for if you don't want to crack into corporate or don't think the high risk area of games development is your thing.

Either way, what your prospective employers want to see is evidence of your skills. e.g. rather than just say you have excellent C++ skills point to something you made in C++. Also, avoid putting things in your cover letter or resume that aren't tailored to the job. One suggestion is that you hand-craft your "skills" section of the resume to the specific job, before listing education and employment. Mass-producing your resume and sending it to everyone is basically a surefire way to get it buried in the "not interesting" pile. Recruiters see resumes all day, they can tell whether you customized your resume for their job or not. And if you didn't they will assume you're just firing hundreds of resumes off and are desperate for a job.

And you know what? You should consider going for a masters in Comp. Sci if you can. If not, you're just jumping in the queue of people who have Comp. Sci degrees and more experience than you. If you go for a job, go for any job as long as it has programming for you to do. I heard about one guy who wanted to be a programmer, couldn't get a job, but got a code QA job at the company he wanted to work in. Kept getting passed over for promotion out of QA because he wasn't gaining proper experience, and the higher ups had a low estimation of the QA people.
« Last Edit: December 18, 2016, 12:02:00 am by Reelya »
Logged

Spehss _

  • Bay Watcher
  • full of stars
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #10274 on: December 18, 2016, 12:55:39 am »

Those things are going to be massively divergent based on what type of industry you're looking to go into. It's kinda too vague to say "programming".
Yeah, I figured as much. I don't think it hurts to ask though.

And you know what? You should consider going for a masters in Comp. Sci if you can. If not, you're just jumping in the queue of people who have Comp. Sci degrees and more experience than you.

Problem with getting a master's is it takes money and time. And I don't even know if it's worth it to just get the bachelor's or an associate's right now, partly because I don't know what to expect form the job market (I hear that it's dogshit though) and partly because I don't know what kind of work I can really expect to look for. That's why I'm asking about other people's experiences. Anyway, deciding to aim for a master's sounds pants-on-head retarded considering my current position. I'll keep that in mind if I can't seem to find any decent work, but I really hope it won't come to needing a master's degree. I'm banking on just developing a portfolio of programs and developing skills and assuming that the skills and experience are more important than what degree I got from what school.
Logged
Steam ID: Spehss Cat
Turns out you can seriously not notice how deep into this shit you went until you get out.
Pages: 1 ... 683 684 [685] 686 687 ... 795