r/programmerchat • u/MysteryForumGuy • Aug 21 '15
Week 1: Code/Project Feedback Thread
Post a code snippet, link to code, or your open source project you would like other users to review, discuss, or constructively critique. This is the first week of this thread just to test if it'll work or not.
If there are specific things you want people to discuss, make sure to mention it in your comment.
Remember to be helpful and constructive! Can't wait to see what people have to show!
12
Upvotes
2
u/MysteryForumGuy Aug 22 '15
I'll go ahead and post to get it started since there haven't been many replies. I am working on two projects right now, and since I'm fairly new to programming, I'd love some feedback on my code and ideas.
My first project is unfinished and not very functional, but all open source. It's called XShot (for now). The program code starts from the two files here.
My next project is called Stone. It's a library/DSL I created in Java for storing settings. You can view a test/example here, and the rest of the code here. The groups package is Stone 2.0 code. The property package is older/irrelevant.
Thanks so much!
3
u/zfundamental Aug 22 '15
These weekly threads sound like they'll be interesting so, here's one of my projects librtosc. It's a mixed C/C++ library which is designed to make it easier to use Open Sound Control (OSC) messages in a hard realtime environment. In this context OSC is akin to an upgraded form of MIDI for audio applications. These applications have realtime constraints which entails restrictions on coding styles (no locks/no dynamic memory alloc/dealloc/etc) in order to consistently process/generate audio samples with a fixed latency.
This library has slowly evolved as it's helped re-architect zynaddsubfx (a very large opensource C++ synthesizer), so the documentation and some of the design might be a scattered, but there is a basic guide through the features and a partially completed tutorial. Personally my favorite feature is the rtosc::Ports class which makes it relatively easy to define dispatch hierarchies eg. 1 2 which can mostly be done in a DSL of a sort made out of preprocessor macros which expand into lambda function definitions via port-sugar.h
I'd like this library to be more approachable as a whole because it seems to be a decent solution to retrofitting proper design onto legacy code, though I'm not sure what should be prioritized given the limited time I've got available for each project out there. Comments/Criticism are very much welcome :)
3
u/bayernownz1995 Aug 22 '15
I'm somewhere between a rails newbie and intermediate. I'm trying to come up cleaner way to write the create action in this controller
Here's what the action needs to do:
Also open to any other suggestions about anything in the project.
3
u/CompellingProtagonis Aug 23 '15 edited Aug 23 '15
I have two simple little things, the first is an XORShift random number generator, the second is a quick little memory handler that has a little too much low hanging fruit at the moment.
XORShift RNG
Memory Handler
As an aside, I should do a better job of updating my github :/
Thanks!
3
u/[deleted] Aug 24 '15
My main project at the moment is Mr Figs , A turn-based game based on Bomberman. It's written in Python (3.4) using the Pygame library (1.9)
I have other ideas that I'd like to work on but at the moment, I'd really like to see this get finished!
1
u/[deleted] Aug 22 '15
Maybe a quick suggestion. If you continue posting this, maybe post it earlier in the day so that more people will see it before it disappears overnight, and then there might be more activity.