Not sure what the best forum for this is, but I also asked this question at http://stackoverflow.com/questions/21122723/how-to-design-plugin-architecture-where-plugins-populate-different-parts-of-a-we
I'm trying to design a system of plugins that populate different components of a web page, wher...
@200_success Wikipedia said BF programs can be translated into C assuming ptr is of type unsigned char* and has been initialized to point to an array of zeroed bytes:
Brainfuck is an esoteric programming language noted for its extreme minimalism. The language consists of only eight simple commands and an instruction pointer. It is a Turing tarpit, designed to challenge and amuse programmers, and was not made to be suitable for practical use. It was created in 1993 by Urban Müller.
Language design
Urban Müller created brainfuck in 1993 with the intention of designing a language which could be implemented with the smallest possible compiler, inspired by the 1024-byte compiler for the FALSE programming language. Several brainfuck compilers have been ma...
The WEC is a fine idea, but people have a natural 'cycle'. I ficure I can only dedicate about 1 day a month to alienating myself from my family, and doing something introverted. I did two challenges over XMas, I am due some down-time in a week or so.
If there were a few more people active in the process, there woul dbe a more consistent appeal.
As it is,, I think most people are on a similar sort of constraint, and the time is coming close to ready for another 'big' WEC.
2
With 5 or so regulars, there just is not enough 'quorum' to make it this regular.
XMas was different because a lot of people had the time all at once, and the interest levels were 'fresh' (new idea, lots of interest).
What's interesting for me is that I tend not to post questions.... and the WEC is an opportunity to actually post something for review, instead of answer.
(I can't post work-related code, and that's pretty much all I m doing right now ... ;-) )
I don't know about others but the suggestions I've seen would take me more than a weekend. But then I guess i should work on shrinking down my ideas to realistic chunks.
@ChrisW: That was mostly my assumption, and not something specifically said by an SE employee. If I am wrong, then the holdup could be due to not having enough users at a certain level (probably lower).
10K gives someone access to moderator tools (but a site will also have voted moderators): you have a few 10K users already (including at least one who's still active). It's plausible that they mean it when they talk about the importance of several 2K/3K users (so that vote-to-close happens even when moderators are away) I doubt you need to race to vote people all the way up to 20K. Apparently another thing (apart from stable community) is traffic and questions/day.
@ChrisW: I did not know that (and actually surprises me). Either way, let's wait to hear what SE has to say about our progress from the previous review. I have been in contact with Tim Post recently, but he has no specific information to share at this time.
@syb0rg if the code license allows it, and you have the official owner's permission to post, then I would simply post and not mention the origin of the code, or, if you you can say "I am contribung this code to project XXX and would like it reviewed first."....
I intend do do that probably with JDOM code i am writing.... I technically have given ownership of the code to the original authors... it makes it easier with my employer. This is code I am contributing to an apache-licensed OSS and I have the offical owner's permission.
The real issues I see are: code that is reviewed and then the review is used as a tool to criticise an unknown third party (i.e. we review code, and the person who posted the code then uses that review to assess an employee or something), and the other problem is code that should not be posted due to legal reasons.
3
One issue is social, the other is legal. If there's no social problem with me reviewing the code, and if there's no legal problem with me seeing the code, then I have no concerns about the code origins.
This feels like a simple question, but I'm wondering what the best way would be to manage the elements of a private, fixed-size array.
Context: I'm making a simple particle engine, and my Emitter class will smoothly interpolate between up to 8 colors per Particle, depending on the Particle's Lif...
@Jamal If you ever talk to Tim Post or any SE community manager, could you ask about how we compare against webapps.stackexchange.com? We seem to have a similar user count and user score distribution, and according to stackexchange.com/sites , a similar Q/A count. Our answer rate is much better. I don't know what other stats need to be taken into consideration, since we are still flying blind.
To elaborate on @Caleb's post, here are two specific examples of how the lack of Data Explorer support for beta sites hurts us:
We would like to compare performance against graduated sites
We would like to target specific kinds of posts for action
Please??
I'm not sure which site is best for this, but I also asked this question here.
I'm trying to design a system of plugins that populate different components of a web page, where each plugin is responsible for its own view or visualization of the underlying data (could be stock data, for example fo...
Why I asked this question here?
So I saw this image on careers.stackoverflow.com, but they don't have a META page, and since careers is by stackoverflow, I thought this would be the most appropriate place to this question ask.
Where can I order/buy the unicorn below? I have to have it!
In my application, there are three domains for the data, the first is a Length (measured in metres as an int),
the second is a Time (measure in DateTime), and finally the Depth (measured by double).
Effectively, my application needs to provide most of its functionality, multiplied by three, to t...
Ok break. Down to 3K lines of code. In one method (still too many elsewhere too). In the shit code I've been refactoring for 4 days. Un-freakin-believable.
if it were properly coded WPF, the whole code-behind would be just the constructor. The model is like 40 lines of code, but it's written with a VB6 cowboy attitude.
so, uh, what's the lesson to learn from a big pile of crap and beginner mistakes? I'm seeing stuff I wouldn't have written as a 12-year-old BASIC 2.0 coder...
Depending on the stench.... it goes three ways: 1. learn when to re-write (and, it's not normally worth it, by the way ....) 2. learn what comments help, and which ones confuse 3. learn that, over time, code atrophies.
@syb0rg I saw that, and, for the most part, I agree....
But .... have you never learned that Toronto, large parts of New York, and a lot of other massive cities are built on land-fill?
yeah, I can't rewrite it, I'm understanding a logic that's emerging as I'm refactoring. And I like my code self-documented, comments are XML comments (what monkeys call "javadoc")..
Looking for review, good practices, optimizations, clean code tips etc.
/**
* Flip the columns.
*
* Complexity:
* O(row * col)
*
*/
public final class Mirror {
private Mirror () { }
/**
* Given a matrix create a mirror image,
*
* @param m the input matrix
...
i am trying to make a simlator for microcontroller in which whenever i call runNextStep() method it will run the next instruction....
i have made a single button which will just execute the next instruction by calling runNextStep() method but i want to make a run button which will have a while lo...
Looking for review, good practices, optimizations, clean code tips etc.
final class Pixel {
private final int color;
public Pixel(int color) {
this.color = color;
}
public int getColor() {
return color;
}
}
/**
* Rotates an image by ninety degrees.
*
*...
I have an array of Item objects that each have a string particular and a numeric amount. I want to put all particulars (separated by newlines) into a single string and the same for all amounts.
Here's what I came up with:
particulars = []
amounts = []
items.each do |item|
particulars << it...
I have written this little tagging module to make it easier to generate small html snippets on the fly. The examples below show how this make things a bit easier. My question is about the handling of tags that contain either a single element like text or a list of other elements, like the tr elem...
I've created a simple Python program that checks the word frequency of a text and shows the results in matplotlib figure. My question is that how can I put this code into object oriented? And how can I put the figure into the canvas? Thanks in advance...
from tkinter import *
from tkinter import...
I want to create all possible combinations of points (0,0),(0,1)...(12345,6789) and then all segements from these points.
The code i have written is simple with no optimization.
Is there any algorithm to generate it in less time?
Thanks in advance.
public static void main(String[] args) {
in...
I'm trying to understand DRY but my javascript skills aren't quite up to scratch to get this code as optimised as possible.
Depending on the width of the screen the javascript animates a node and then loops another animation.
Here is a JSFiddle to show you an example of what I mean: http://jsfi...
I have tried to write code of Box stacking problem (mentioned here)in C++ .
Kindly give me some views on what mistakes I might have made and how I can improve.
It is running for the two inputs I have provided.
Thanks
//============================================================================...
I wrote this unbalanced binary tree and would like to know how to improve the code and performance. If you can point out any situations that are not being handled appropriately, that would be great too.
It supports element insertion, removal, search, iteration, tree balancing and encoding/decodi...
There is a recommendation not to use an Exception to control the flow of execution. This gives me a reason for doubt when I do something like this:
public void initApplication(String input) {
try {
MyClass mClass = new mClass(input);
saveToDatabase(mClass);
...
The question is very simple but also a bit theoretical.
Let's imagine you have a long JQuery script which modifies and animate the graphics of the web site. It's objective is to handle the UI. The UI has to be responsive so the real need for this JQuery is to mix some state of visualization (sp...
I am quite new to event programming in C# specially in WPF. I have made a very simple core app which I am planning on extending.
It's very simple as its purpose is learning curve and doing things the right way that's why I am asking here for a review and not help on building as most of the buil...
I have to work with a 3rd-party API that allows me to define and execute "commands", using XML. Since I don't like seeing mixed abstraction levels, I managed to remove all the inline XML / string concatenations by creating a simple XmlCmdBuilder object - here is the C# implementation (I have one ...
I have to work with a 3rd-party API that allows me to define and execute "commands", using XML. Since I don't like seeing mixed abstraction levels, I managed to remove all the inline XML / string concatenations by creating a simple XmlCmdBuilder object - here is the C# implementation (I have one ...
Given the large size of the potential result set, the previously suggested iteration mechanism seems appropriate.
I looked at this and thought 'nice challenge', and I looked at your code, and figured there were too many loops. The way I see you doing the work inside the loops also looks cumberso...
There is some complicated code in that ..... anyone care to try to read it?
Actually, I think I will post is as a question ;-)
Naah, not yet... need to go to work.... be back in about 40 minutes ...
I used step 4 from the Angular tutorial to do some tinkering of my own. In that particular step of the tutorial, a option list is created that determines how a list is sorted (Alphabetically, by age). I tweaked the code to dynamically generate these sorting options from the data set.
Essentiall...
not sure exactly how this will be used, so this might be a null point.
you have add methods but you don't have any remove methods. not sure it would make extension easier, but it would probably provide you with a way to remove deprecated commands (you may or may not want to do this because of ...
I still have to figure out who gave the best answer on that Brainfuck question
@retailcoder something doesn't feel right about deploying a new version of this library to the GAC whenever a new XML command is needed XmlCmd has public constructors, so you don't need factory methods: people can construct new XmlCmd without new factory methods in the GAC. And/or perhaps you can add new factory methods to the GAC without changing previous factory class, by coding the new factory methods as "extension methods" of factory.
The idea of the below code is that I feed back to a Gridview if the user has permission to view the property otherwise that property is not show.
The data is passed in via SessionParameters
USE [database]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
alter PROCEDURE [dbo].[spSafeguardi...
@retailcoder Does each command have a fixed set of parameter names and types, and fixed number of parameters? Or are methods overloaded with different types (e.g. does SetOptionValue also support int parameters)?
@Malachi Do you think questions on this site are useful to the 'long tail' of future readers? Or (unlike other SE sites) are questions generally so specific (i.e. what used to be called, "too localized") that they're only interesting to the OP?
@ChrisW most of what we answer on the review end is design patterns, common coding practice, syntax and such. so I would say that it is like the other sites in that aspect, I can still learn things from the old reviews.
After reading some texts regarding creation of files under python, i decided to create this class which creates a new file on a directory, and creating a backup on the other directory if the file already exists (and if it's older than x hours )
The main reason i opened this question is to know i...
I am trying to learn a bit of the language (Haskell) but I am having some problems with understanding how to make programs with pow*.
For example I have to create the following program:
Input an integer number n and output the sum: 1+2*2*+3*2*+...+n* 2. Use input validation for n to be positive...
@Jamal Tried to run queries but they do not work for me .... Something unexpected went wrong while running your query. Don't worry, blame is already being assigned.
Most commands have 1 specific way of being configured, but some might have 2-3 overloads with varying parameters and parameter types. — retailcoder6 secs ago
@Malachi lol. I think it's T-SQL, but I've never really used the SEDE for anything other than running other peoples' queries.
TI-BASIC is the unofficial name of a BASIC-like language built into Texas Instruments (TI)'s graphing calculators, including the TI-83 series, TI-84 Plus series, TI-89 series, TI-92 series (including Voyage 200), TI-73, and TI-Nspire. TI usually doesn't refer to the language by name, but the name TI-BASIC has been used occasionally in developer documentation.
Anyone can help? Error on code golf - http://data.stackexchange.com/programming%20puzzles%20&%20code%20golf%20stack%20exchange/query/6627
Although the Stack Exchange Data Explorer is an invaluable tool for many, it appears that the Programming Puzzles & Code Golf site is throwing an error upon querying. It appears to me to be a result of the ampersand & in the URL. As code golf is one of my favorite activities on Stack Exchange, I ...
I have 3 dependent picklists so that Category picklist values depend on Group values and SubCategory values depend on Category. What is a good way to define the structure in Javascript that would describe these dependencies? and why? I have tree variants.
//1
var myStruct = {
...
I've heard that Lbl and Goto use up memory that they don't give back. I've noticed clearing the RAM on my calculator frees up a lot of space and makes my programs run a lot faster. Any suggestions on how to minimize memory leaks here would be greatly appreciated. (This code does function correctl...
I would, but that would mess up my divisible-by-5 rep score. And then I'd have to downvote @Malachi's answer, and someone else's, to get back to a rep score that satisfies my OCD.
I've heard that Lbl and Goto use up memory that they don't give back. I've noticed clearing the RAM on my calculator frees up a lot of space and makes my programs run a lot faster. Any suggestions on how to minimize memory leaks here would be greatly appreciated. (This code does function correctl...
Below is a pretty simple Python script to ingest some data, massage it as necessary, append a column, sort it, and then write it back to another file. Still learning all the Python best practices and APIs, so as always, any tips and tricks are appreciated! Feel free to be brutal with me if it's...
@Malachi Is that because they're not answered? Or are there upvoted answers which the OP didn't (perhaps out of ignorance for the way things work) didn't accept?
I haven't looked at these Queries very closely. I am at work but you can bet that I am going to check this out when I get home tonight. After I do important finance stuff to get rid of all my money.
I just took a stab at creating a library for something I'm dubbing semi-synchronous programming (async + dependencies). It's rather dense, but I'd really appreciate a quick code review to ensure I'm not introducing any race conditions. Feedback on best practices, general improvements is also we...
@retailcoder the accepts might be accepted/all answers. which would make more sense, because it just means that we have more answers then there are questions.
that could be a big reason why the percentage is going down, because you can't accept all the answers on a question... so the percentage will always be less than 100% no matter what.
@Malachi I'm pretty sure it's counting questions that have an accepted answer. But it isn't excluding closed questions, and I'm not sure about the a.score >= 10 part in that left join.
@Donald.McLean yeah I saw that too, I didn't even think about the closed questions part. I would play with it more if I wasn't trying to look like I was working....lol
@user2369284 The only competition we like here is who writes the best code. Too short variable names = Not the best code. If you are interested in writing short and obfuscated code, Code Golf might be something for you. — Simon André ForsbergDec 19 '13 at 19:57
Daniel Cook answered your previous question 37 minutes before you asked this one. He told you to use better variable names. I won't review this until you use better variable names. That is why I am downvoting this. Please edit it and use better variable names and I will gladly review it and give it an upvote. — Simon André ForsbergDec 19 '13 at 20:00
Your naming is awful. Even void main(String[] args) has been butchered to void main(String[] ar)... and the only identifier that's more than 2 letters in this code, is called found - which implies a search, but the method is called compress.
What exceptions are you swallowing, and why? I'm no ja...
import.util.*
One thing I have notice from reading other Java Reviews is that you don't want to import more libraries than you have to, really this goes for any language I would think. so figure out what you need in java.util and import that. I know that in C or C++ there is a library that when...