Reputation
209
Top tag
Next privilege 250 Rep.
View close votes
Badges
2 7
Newest
 Yearling
Impact
~3k people reached

  • 0 posts edited
  • 0 helpful flags
  • 12 votes cast
Jul
23
comment How can I incorporate TCP/IP networking into an Atari 2600 emulator?
Cool, I'll talk with the Stella community. Thanks Michael.
Jul
23
comment How can I incorporate TCP/IP networking into an Atari 2600 emulator?
@MichaelT This is using the Stella emulator, running on a PC. I'd like to pass pixel data to the game and display the pixels on screen. Basically the graphics would be generated externally to the game. I suppose this would require modification of the emulator. If someone can point me to an article or information on how to do this, I'd be happy to update this question's title and content and award points to the answerer. Thanks guys!
Jul
23
comment How can I incorporate TCP/IP networking into an Atari 2600 emulator?
@Ixrec I'd like to modify Google DeepMind's software to learn to play the stock market (yes, I know seems far-fetched, but I'd like to give it a try using Deep Learning). Basically I would generate a chart outside of the game and pass the chart pixel data to the emulator. Basically the game graphics would be generated using external data.
Jul
23
comment How can I incorporate TCP/IP networking into an Atari 2600 emulator?
@MichaelT I understand. I've reworded the question. I'd appreciate it if you could just look beyond the wording and understand that I'm asking HOW to do this, and provide feedback on how to actually do it, if you're able to.
Apr
23
comment Are short abbreviated method/function names that don't use full words bad practice or a matter of style?
That's why namespacing exists -- to avoid clashes.
Apr
23
comment Are short abbreviated method/function names that don't use full words bad practice or a matter of style?
Absolutely agreed. It really irks me to see things like col, cat, and elm instead of column, category, and element. I see no benefit of using abbreviations (or as a coworker put it, "single-syllable variable names"). It saves pretty much no time to type "col" rather than "column," and any time savings will be outweighed by other developers repeatedly having to take an extra second or two to figure out what some abbreviation actually means.
Nov
6
comment Would it make sense to have a database table with only one record for tracking site summary stats?
@GrandmasterB Wouldn't the tally system be the same as what I would be doing with the stats table (keeping a summary and using that to log the balance in each new transaction)? If not, how does a tally system differ?
Nov
5
comment Would it make sense to have a database table with only one record for tracking site summary stats?
Ah, so a view that aggregates all transactions. Not a bad idea, but, there could be many, many transactions...millions. I am storing both user-level transactions AND site-level transactions (I'm using Mongo, so hence the optional-ness of transactions.userId). So, in a site-level transaction, I need to log the current site balance, and since transactions will happen frequently (let's say 10 per second), I would think an aggregation query would have a negative impact on performance.
Oct
29
comment Is this a secure solution for RESTful authentication?
@Donal That's true...maybe this is overkill. How would you do it? If using SSL, would you keep it simple and 1) send passwords via REST POST in plain text (encrypted via SSL) and 2) just assign a token for each user account and send that in each user's API request?
Oct
28
comment Is this a secure solution for RESTful authentication?
Yep, it'll be over HTTPS, and I'm using Sinatra for the API.
Aug
31
comment Do mixins create coupling with Ruby?
It's not a complete code listing.
Jul
24
comment One or many RESTful APIs for large company?
Good point. This is all internal, so luckily there are no liability concerns.
Jul
24
comment One or many RESTful APIs for large company?
Thank you for your feedback. Might this look like using multiple endpoints reverse-proxied or virtually mounted under one domain? Example: api.company.com/api1/resource, api.company.com/api2/resource; api1 and api2 are different endpoints possibly hosted on different machines and different vhosts.
Jul
25
comment Do mixins create coupling with Ruby?
Cool, thanks again for the follow-up of the follow-up. Now, going further, if I use App.keyring to access the keyring instance, aren't any libraries that require a keyring instance coupled to App (and require it to come along for reuse in any other Rails app utilizing keyring)?
Jul
25
comment Do mixins create coupling with Ruby?
By "everyone" I'm mainly referring to bloggers and StackOverflow-ers. So which would you strive for if you were in my shoes, solving this problem: a mixin approach or a DI approach?
Jul
25
comment Do mixins create coupling with Ruby?
So you would recommend I go a dependency injection route to provide classes access to the keyring instance? Isn't this anti-Ruby, considering everyone advocates modules/mixins over DI?
Jul
25
comment Do mixins create coupling with Ruby?
Thanks for the added response. So, let's say I put the keyring instance in the App module. Would I then "include App" in my FtpConnection class and access the keyring instance there via the "keyring" method which would be mixed into the FtpConnection class? Or would I access the keyring instance in FtpConnection via "App.keyring"? Or something else?
Jul
25
comment Do mixins create coupling with Ruby?
My application needs one keyring instance for use with multiple other classes application-wide. This is similar to a database connection. Using a dependency injection-based design, I would instantiate the keyring object at the application level, store it in a registry, and access it as a service via a service locator. Thus, it is not a singleton. Does this make sense? What would you recommend I do, considering it is needed application wide?
Jul
25
comment Do mixins create coupling with Ruby?
Maybe a symbol name could be used for the module name. Or, better yet, maybe a fancy class macro could be used in conjunction with a symbol. Hm. Does anyone know a commonly-used way around this coupling?
Jul
25
comment Do mixins create coupling with Ruby?
Well, I'm comparing this to a dependency injection approach, which might be closer to perfect and would not require copying and pasting.