everyone and they momma bout to apply for this
Is it me or is reading javascript code a fukking pain in the ass? Nesting so much shyt, so many brackets, cant easily determine scope of a function. Seeing curly brackets for something and being like why is that even being used . Anonymous functions making shyt hella confusing. Reading React code with html tags.
I have training in C#, still beginner but not a complete neophyte, but i dont remember having these kind of problems.
Still trucking tho.
These PaaS guys basically just asked us if they don't provide an environment will it impact our development ?
I gotta get off this sinking ship man
#include <iostream>
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS
#endif
namespace GhettoRedux {
template< class T, class A >
class Store {
T _state{} ;
T (*_reducer)( T, A ) ;
void (*_subscribe)() ;
public :
Store() { }
Store createStore( T (*reducer)(T, A) ) {
_reducer = reducer ;
return (*this) ;
}
T dispatch( A action ) {
_subscribe() ;
_state = _reducer( _state, action ) ;
return _state ;
}
void subscribe( void (*subscribe)() ) {
_subscribe = subscribe ;
}
T getState() const{ return _state ; }
} ;
}
struct Action_t {
std::string type ;
int data ;
} ;
int counterReducer( int state, Action_t action ) {
if ( action.type.compare( "INCREMENT") == 0 )
return state + action.data ;
else if ( action.type.compare( "DECREMENT") == 0 )
return state - action.data ;
return state ;
}
int main( int argc, char** argv ) {
GhettoRedux::Store<int, Action_t> s ;
s.createStore( counterReducer ) ;
s.subscribe( []() { std::cout<< "WHAT?!\n" ; }) ;
Action_t a{ "INCREMENT", 5 } ;
Action_t b{ "INCREMENT", 4 } ;
Action_t c{ "DECREMENT", 3 } ;
s.dispatch( a ) ;
s.dispatch( b ) ;
s.dispatch( c ) ;
std::cout << s.getState() ;
return EXIT_SUCCESS ;
}
Is it me or is reading javascript code a fukking pain in the ass? Nesting so much shyt, so many brackets, cant easily determine scope of a function. Seeing curly brackets for something and being like why is that even being used . Anonymous functions making shyt hella confusing. Reading React code with html tags.
I have training in C#, still beginner but not a complete neophyte, but i dont remember having these kind of problems.
Still trucking tho.
Example of a web portfolio. It's damn good.