Author Topic: Programming task (DNA editor)  (Read 13218 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #30 on: July 18, 2014, 01:26:13 AM »
Are we going to use any alternate file extension?

I dunno.  Maybe .dna?

I'm dying to see what you have.  Let me know when I can look :D

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #31 on: July 18, 2014, 05:03:11 AM »
I think you may be able to next week, depending on my wireless situation. It should all be fine, though.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #32 on: July 18, 2014, 06:15:40 AM »
Oh, I get it. You have to make each tabs contents as a nested object the belongs to the general tab object. The general object will also have a close button. Yea, that is very annoying.

Hence leaving it for now. It's something that is less important.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #33 on: July 19, 2014, 10:47:14 AM »
Right, I think it's at a point where I could get feedback. It's not polished at all, (and neither is the code if you want to see that) but there's something there. :)

EDIT: it would help if I actually uploaded the files.
« Last Edit: July 19, 2014, 10:49:02 AM by Panda »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #34 on: July 20, 2014, 10:25:37 PM »
It either crashes for me immediately or nothing happens :(  Can you zip up your solution and I'll try debugging it?

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #35 on: July 21, 2014, 04:07:11 AM »
I didn't get chance to test it on another machine so I guess it's missing some library or something. I'll zip the solution now for you.

I had it in the Modules folder of the DB3 solutions.
« Last Edit: July 21, 2014, 04:17:02 AM by Panda »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #36 on: July 25, 2014, 03:15:22 PM »
Have you had any problems with it at all?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #37 on: July 25, 2014, 06:53:28 PM »
Sorry I was out of the county most of this week. I'm going to try and look at it this weekend.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #38 on: July 26, 2014, 08:47:55 PM »
Got it working.  It was an issue with x86/x64.  You had it set to Any Cpu, which on a x64 machine tries to run it 64 bit.  But some of the assemblies are x32, which it can't load in x64 mode.  Switching the platform configuration to x32 fixed it.  I'm playing with it now.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #39 on: July 26, 2014, 09:42:10 PM »
Okay, I like this a lot :D  These are some nitpicks, but nothing too hard I don't think:

1.  Syntax highlighting doesn't seem to work until after you move to the next word.  eg: "5 4 store"   store won't hilight until you press enter or space
2.  Is it possible to have the error message for a error squiggle in the text editor show in a popup tooltip type thing if the user hovers over it?
3.  View->Show line numbers doesn't seem to do anything.
4.  The undo/redo stack seems too coarse to me.  In Visual Studio undo won't undo more than a single word at a time, but this is set up to undo an entire sentence or paragraph at a time.  This is probably more a matter of taste than anything.
5.  The error window and the text in the text editor will flicker when an auto-parsing happens and tries to refresh them.  I'm not sure how to prevent the flicker.  You'll have to play nice with the way winforms refreshes, and that's a whole can of worms.  So maybe leave this for last.  But there must be a way to update a control without it flickering.  You might need to google around or Stack Overflow to figure it out.
6.  Save as doesn't change the name of the tab.
7.  Probably just name the tab the document name and not its full path, unless possibly there's a duplicate tab with the same name open.  And then maybe you show only the file path that's different and not the same.  eg: robots\robotA.txt and robotsbackup\robotA.txt instead of c:\Darwinbots\robots\robotA.txt and c:\Darwinbots\robotsbackup\robotA.txt
8.  It would be nice if you had something in the tab to show if the file is the same as on disk or not.  At its simplest, you could do a blue circle next to the name in a tab to show that it's the same as on disk, and a red circle to show it's different.  Compare what notepad++ does.
9.  The find/replace window seems to flicker when it's opened for the first time.  It's probably loading all the controls up fresh every time.  Try creating a find/replace window at startup and just show/hide it.
10.  It would be nice if F4/Shift+F4 went to the next/previous error in the error list.  This is how Visual Studio does it.
11.  Likewise, keep the currently selected error hilighted when you switch focus back to the text document after a user double clicks on the error.
12.  Make the entire row in the error list clickable.  Right now, if you try to double click anywhere right of the end of the description text for an error, nothing happens.

...

I did a cursory glance at the code, but didn't take any notes.  There's a few rough places, but generally it's fine.  Also, when I try to double click on eg: DevControl.cs, the form designer won't show because of an error.  It looks like an issue with Visual Studio and not the form itself, as the code looks fine.  Does it happen for you?

...

Also it exposed a bug in my DNA parsing code, so if you were trying to figure out why code like "{ 5 4 add }" was erroring out, that's my bad :/
« Last Edit: July 26, 2014, 09:45:04 PM by Numsgil »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Programming task (DNA editor)
« Reply #40 on: July 27, 2014, 07:58:29 PM »
Wow Numsgil, you really are a tough debugger. Almost reminds me of my last boss.  :)

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #41 on: July 28, 2014, 12:34:13 PM »
Wow Numsgil, you really are a tough debugger. Almost reminds me of my last boss.  :)

I quite like it, to be honest. :D I love feedback, especially negative feedback.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #42 on: April 01, 2015, 12:32:32 AM »
Okay I've submitted what you sent me to SVN.  They're both added to Sunweaver.sln listed as Sunweaver.Editor and Sunweaver.Standalone.

It would be great if you could look at some of the things I mentioned.  Otherwise I'll eventually get around to them :)

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Programming task (DNA editor)
« Reply #43 on: April 03, 2015, 04:07:34 PM »
I'm sure I will get around to them! It'll be in a couple of months before I'll have the free time to do it.

After that I hope to get on with something else for DB3, if there's anything I can do, but I can't promise anything.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Programming task (DNA editor)
« Reply #44 on: April 03, 2015, 04:25:20 PM »
I have some ideas for projects in Sunweaver if you aren't sick of it yet (things like static code analysis to find sections of DNA that don't do anything and remove them when executing the code to make it faster) .  Or if you want something more adventurous I might have some ideas for things in other modules.  At the easier side it's writing tests to expose bugs in things I'm pretty sure have bugs in them, and then trying to fix them.  At the more extreme end it's things like integrating Yeppp! in to the math library and seeing what sort of performance gains that gives.