u/auto_turret - 12 Archived Voat Posts in v/programming
u/auto_turret
  • home
  • search

u/auto_turret

2 posts · 10 comments · 12 total

Active in: v/programming (12)

  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››
Comment on: Learning the ultimate basics of Python, need help with one problem

Use the raw_input() function if using python 2, or input() function if using python 3.

var = input("Prompt text")

Should wait for user input, and return typed string after user presses enter.

Then you can test the string against your passcode and print message

0 23 Oct 2019 22:55 u/auto_turret in v/programming
Comment on: Software Disenchantment

I especially appreciate this quote from the essay:

A DOS program can be made to run unmodified on pretty much any computer made since the 80s. A JavaScript app might break with tomorrow’s Chrome update

0 26 Sep 2018 08:52 u/auto_turret in v/programming
Software Disenchantment
1 1 comment 26 Sep 2018 08:51 u/auto_turret (..) in v/programming
Comment on: WPF C#: Static classes, when to use them?

Scratch the last comment, got rid of the static from SerialPort too. I think I've pretty much got this concept down, now. Been banging my head for a month, then finally came to you guys for advice. Turns out that's exactly what I needed!

0 24 Jun 2018 14:22 u/auto_turret in v/programming
Comment on: WPF C#: Static classes, when to use them?

On top of that IoC, actually explodes the amount of code that you need exponentially to do the exact same job.

Exactly what I observe. Coming from firmware programming where sometimes your usable ram is measured in BYTES, I kept initially gravitating towards trying to make every bit and byte count. Well, it just don't work that way in Windows app coding..

I can see how it could be quite helpful in swapping modules down the road, and my small app so far seems it could be easily followed and understood without excessive commentary.

0 23 Jun 2018 19:42 u/auto_turret in v/programming
Comment on: WPF C#: Static classes, when to use them?

I've re-written the darn thing again, but this time using the dependency inversion principle. NOW things make more sense.. high level modules don't depend on lower level modules, but rather abstractions that don't rely on details.

Works for everything BUT the serialport functions. It appears it must be static or my port won't stay open.

0 23 Jun 2018 10:02 u/auto_turret in v/programming
Comment on: WPF C#: Static classes, when to use them?

Cool man, I did use something exactly like that to access my Receive() in my CaptureEngine class from my RS232Functions class. Something to the effect of

private RS232Functions _instance = new RS232Functions(); public RS232Functions Instance { get { return _instance; } }

and

// Create function call on data received serial.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(CaptureEngine.Instance.Recieve);

to use it.. so far that's been working out for me.

0 21 Jun 2018 13:50 u/auto_turret in v/programming
Comment on: WPF C#: Static classes, when to use them?

Thanks for the reply. I'm drawing out my program for the umpteenth time, it is slowly starting to click I think..

I believe my trouble is, I keep reverting to thinking like I'm coding a microcontroller which keeps me running into roadblocks.

Referencing your code: I see what you did there, didn't realize I could pass along the whole instance and it's current state.

I believe now, if I put an event listener in that ViewModel constructor instead, and stick _channelModel = channelModel in a method that will call, it should listen for a newdata available event and update itself accordingly, so long as I've created a new ViewModel instance in my main program.

I'll give it a shot. Thanks man, that was super helpful. Going to check out the links you've provided.

0 21 Jun 2018 00:25 u/auto_turret in v/programming
WPF C#: Static classes, when to use them?
1 0 comments 20 Jun 2018 22:03 u/auto_turret (self.programming) in v/programming
Comment on: Coding Saves

That whore couldn't work the copy machine.

0 29 Apr 2018 13:13 u/auto_turret in v/programming
Comment on: What are you guys learning at the moment?

Building a platform to accept most forms of industrial sensors, inputs, modbus, the whole nine yards. My prototype version will have a real AY-3-8910 sound chip.. for fun. Also first time I'm playing around with an FT800 touchscreen display driver.. also for fun.

1 10 Feb 2017 23:07 u/auto_turret in v/programming
Comment on: My Boys Birthday Present.

I would have loved to be introduced to this type of shit when I was a young lad. I didn't discover it until I was in my mid-20's.

1 02 Jan 2017 13:21 u/auto_turret in v/programming
  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››

archive has 9,592 posts and 65,719 comments. source code.