129 karma · joined June 7, 2015
But I think in the long run everything depends on exact project rather on our wishful thinking.
I had experiences when use of library was much better solution than own baked one, but I also had experiences where none of the libraries I had found were quite fitted for the project and many times I just had to throw library and write something from scratch in simple way.
> reusable libs are tested by the whole community.
reusable libs are often FOR the whole community and not for YOUR project. Ofc sometimes you need exactly what rest of community needs, but sometimes not.
You have to deal with these kind of structures anyway. You have to be able to render such data as hierarchy of components, you have to be able to get some information from it, to transform it, to update it.
Tree traversal is almost as common in front-end world as using .map, .filter or .reduce, I think (and using `reduce` also can seem hard on beginning, but it's quite useful).
This very statement reminds me of famous "why can't programmers program" article: https://blog.codinghorror.com/why-cant-programmers-program/
Programming needs some technical skill anyway. And learning "how to use library X" often takes more time than learning "how to implement algorithm X". Libraries are often bloated, bugged, hard to debug or have terrible API. In these moments basic programming skill set is very useful.
*old song, according to Youtube comments is every song recorded before 2016 AD.
100% true! So many times I was assigned to the task in issue tracker, where requirements was written, estimation was made, but after I sat and tried to solve given problem, it turned out that 80% of issue description was false - real problem was totally different than it was written in task.
What seemed right on planning meeting, turned out to be quite false in the process.
But quite often managers/product owners etc. don't understand this. They often believe 100% in planning ahead and issue tracker/backlog descriptions... And when something is going off the track (like it sometimes does - when problem needs extra time for thinking through) they aren't so glad because thinking and design process was not budgeted in issue tracker (even if it could lead to the better design on the long run).
*I checked some tips in Chrome Dev Tools, and most of them was still relevant.
"In a more complex app, you're going to want different entities to reference each other. We suggest that you keep your state as normalized as possible, without any nesting. Keep every entity in an object stored with an ID as a key, and use IDs to reference it from other entities, or lists. Think of the app's state as a database." http://redux.js.org/docs/basics/Reducers.html#note-on-relati...
TL;DR Redux docs are telling you "Think like a stack: zoom in to the book-keeping details and ignore the structure."
class MyClass:
pass
class_list = [MyClass]
third_party_function(class_list)
# or just
third_party_function([MyClass])
?creating some simple wrapper for third party function, e.g.
def wrapper(C):
third_party_function([C])
could also be much simpler solution :)But it's maybe off topic.
You should have said that to the team. Especially that if anything goes wrong in project, usually it's new person on the board / junior programmer that gets the blame.
Besides not telling that was just not honest to the team. I think we should all learn from each other, no regard with the job title.
> work that wasn't too complicated
"complicated" is subjective. There are many talents and somebody could be better in for example JavaScript (and not HTML/CSS).
I think data-driven approach is huge win for that. It's all data after all.
What is the problem? Creating visual editor is hard. Idea is obvious, but implementation, ux etc. is hard (I see sometimes visual editors for apps and most of it are sh*t).
But It can easy lead to inner platform effect. Not needed complexity. And in JSON you can't write JS code (needed for e.g. event handlers).
So I switched to JS. Still data-driven approach (simple hierarchical objects with data), but with power of JS (and if you're use Babel, you could use JSX for your DSL).
So: I don't think JSON is best format for what you try to achieve. It's just so limited.
Besides what is added value of Jasonette? When I look on Jasonette I have feeling that it's just reinvents ReactJS but in JSON not JSX. Not sure if there is much profit with JSON format alone.
`My initial thought was making a grid of spinners,(...) but then I realized that there isn't an easy way to make headlines in Qt's grid. (...) So after some searching, I found out that it would be better to have a tree view(...)`
And many similar things. Exploration and technical spikes - nothing wrong with that but author wrote: ` It's pretty common to do so if you're in an exploratory phase, but in this case, I had a pretty good idea of what I wanted to do right from the start, and that plan seemed to work. `
and then he contradicted himself writing about various difficulties and explorations... (I don't see anything wrong with that, absolutely. I think that exploratory phase is essential to good design).
(but it would be only pseudo jQuery, the way you can have pseudo React just by using functions and ES6 template strings https://jsfiddle.net/vug86rn0/ )
const animal = "cat"; <Component {animal} /> equivalent to: <Component animal={animal} />
Maybe I will port my Atom plugin ( https://atom.io/packages/atom-lupa ) to VSCode or maybe I'll write from scratch whole thing.
I don't know when exactly though (now I'm making something bigger than that and it takes time).
It depends on many factors:
- what is the problem? (some problems are really hard, some problems are trivial and just seem hard)
- is developer experienced enough to build own solution?
- are existing solutions good or badly written?(I often refrained from using existing solution when I looked on bloated code in it).
- is solution suitable to project? ("too much bundle size", "doesn't support X", "not too configurable", "too slow", "too hard to use").
etc.
So maybe we shouldn't complain. These websites are just meant to be zoomed.
Although some web developers are cruel and block zoom with meta tag (I never understood why some developers did that, maybe for trolling people with poor sight?).
It was very cool because I was able to see internal server state on simple HTML dashboard I made (for example I was able to see map with player positions or some important game variables etc.).
And I made some controls(buttons etc.) to dynamically change state on backend (for purpose of tweaking/experimenting/etc.).
So it was like turbo-debugging :)