TECH |
Engadget Japanese |
1986年2月21日、ディスクでゲームを供給する「ファミリーコンピュータ ディスクシステム」が発売されました:今日は何の日? |
https://japanese.engadget.com/today21-203030957.html
|
周辺機器 |
2022-02-20 20:30:30 |
AWS |
AWS Podcast |
#506: AWS Cloud Control API |
https://aws.amazon.com/podcasts/aws-podcast/#506
|
AWS Cloud Control APIIn this episode Simon speaks with Jay McConnell Principal Developer Advocate AWS and Rahul Sharma Sr Product Manager AWS about AWS Cloud Control API Launched in September AWS Cloud Control API is a set of common application programming interfaces designed to make it easy for developers to consistently manage their cloud infrastructure and leverage the latest AWS capabilities faster AWS news blog post Lean more User guide and API reference Explore cloudctl |
2022-02-20 20:32:53 |
海外TECH |
DEV Community |
How To Hire Programmers |
https://dev.to/bytebodger/how-to-hire-programmers-8d
|
How To Hire ProgrammersMy regular readers both of them know that hiring and developer evaluation are some of my favorite topics Or perhaps more accurately they are two of my biggest pet peeves In my angry annoyed agitated opinion soooooo much of how we evaluate talent is fundamentally and critically broken Due to this agitation I ve already written tomes on this site about everything that I think is wrong But some thoughtful commenters on past articles have flipped the equation back on me If these are all the things that you feel are broken what exactly would you contend is the right way to go about evaluating potential hires It s a fair challenge After all it s easy to sit on the sidelines and gripe about everything you don t like It s quite another to present a meaningful actionable plan on how to make it better So here you have it The patented Adam Nathaniel Davis Programmer Hiring Plan HINT It s not nearly as difficult or as convoluted as so many companies and hiring managers make it out to be I m not going to get into how you find programming candidates I m not a recruiter From my perspective quality candidates are dang near everywhere But then again my perspective from within the career field is undoubtedly a bit biased I ll just assume that you can find a pile of candidates But how do you know which one deserves an offer The Non Technical Phone Video ScreenI feel like this has become a fairly standard first step in most hiring processes And quite frankly I don t have any real problem with it So if your organization wants to follow this model I get it Some non techie type calls Candidate to do some really basic really high level scoping out It should be painless simple and brief minutes max It seems to me that the primary goal in these calls is usually to understand the Candidate s salary expectations And many candidates are dumb enough to spit this out in the first call NOTE This is definitely the subject of a future article My only critique of the initial screening call is that beyond the desire to discover salary expectations I m really not sure what else the Candidate can do on these calls to get eliminated When I m on one of these calls myself it often seems that I ll be forwarded to a second interview even if I tell the screener that I have to cut the call short because I m flaying someone alive in the basement and their screams are making it hard for me to hear the questions I do think there can be value on these calls for both parties if there are any aspects of the role that are in any way unique or non standard For example if you re calling someone in Poland but the job would require relocation to Bolivia then it makes sense to start with the non technical screening No need to waste everyone s time if the opportunity is a complete non starter for the Candidate This is also a good place to address any obvious high level mismatches between the opportunity and the Candidate s CV For example maybe he has a mix of BA roles and coding roles on his resume but you re hiring for a pure coding position Is the Candidate open to this condition Although this screening is typically simple and difficult to screw up for either party there are a few habits I ve seen from non tech screeners that I find annoying AF For example I don t know how many times I ve had a scenario like this A recruiter pings me and says Here are the details about a role with XYZ Corp Can I submit your resume I agree and a technical screening will soon be scheduled but the remainder of the conversation in the initial call goes something like this Screener So how did you hear about XYZ Corp Me A recruiter pinged me on LinkedIn The mere fact that I have to state this always strikes me as borderline silly I mean nearly every opportunity that I care to pursue starts with a recruiter pinging me On LinkedIn Screener I see Well what do you know about XYZ Corp Me I know that your recruiter pinged me on LinkedIn which led to this call Screener facetious laughter Oh sure OK But what makes you want to work for XYZ Corp Me I have no idea if I want to work for XYZ Corp You called me Screener more facetious laughter Me Look I gotta go I m flaying someone alive in the basement and the screams are making it difficult to hear your questions The Technical Phone Video ScreenThis is also a fairly standard aspect of many companies hiring processes And I don t necessarily have a problem with it In fact in some instances it can provide real value But there are some significant gotchas here that I really need you to understand This should never be done in person I don t care if you re hiring for a strictly onsite role There s still nothing in the technical screen that can t be handled effectively and efficiently in a phone video call Save your own time and respect the Candidate s time by making this a purely remote aspect of the process Like the non technical screen this call should never exceed minutes The point of the call should not be to have the Candidate give you a minute soliloquy about his entire CV Nor should it be to delve deep into every corner of his technical knowledge It should just be to ensure that the Candidate can speak programmer ese If you can t complete this call in a half hour you re doing it wrong This call should be to test the Candidate s knowledge of general concepts Yes those concepts will be technical but they should still be high level Focus more on languages e g JavaScript rather than frameworks e g React Better yet focus on even broader concepts e g principles of web development Do not get cute by trying to quiz someone on say the default parameters of some language s particular built in function Do not ask gotcha questions e g A null evaluates to what type in JavaScript The goal here should not be to stump someone on esoteric concepts The goal should be to verify that the Candidate is indeed a programmer with at least a basic grasp of key concepts If you re quizzing the Candidate about the difference between the Function constructor versus a function declaration you re doing it wrong Agree on the questions to be used in this screening and give the same questions to every Candidate This is one of my pet peeves Joe performs some of your tech screenings and he asks softball questions Mary performs some of your other screenings and she asks hardball gotcha questions This is poor form and it will skew your evaluations Give serious consideration to making this screening conditional based upon the Candidate s experience In other words if you re talking to a year programmer it s kinda ridiculous to put them through this screening And yeah I can already hear some of you screaming that you don t know if a candidate s experience CV is legit so that s why you put everyone through the same screening To this I d reply Get over yourself If someone has truly fabricated their resume there will still be ample opportunities to expose them And NEWSFLASH such blatant fabrication is pretty rare When I m put through these screenings it doesn t bother me at all But it s really a waste of time for me as much as for the employer I know this ll sound cocky as hell but I don t care I m gonna say it anyway If I m applying for a JavaScript position and I fail your minute phone tech screening it says far more about your tech screening than it does about my skills The Coding AssessmentOK So now we come to the real meat of the hiring process The dreaded frequently botched and rightfully maligned coding assessment Someone has passed your initial non technical screening and your technical screening but now you wanna know if they can really code So here s what you should do NOTE With modern tools this should be every bit as manageable for remote employees interviews as it is for in person meetings Screensharing and collaborative code tools e g StackBlitz now make it incredibly simple to watch someone coding in a live setting Sit the candidate down at a real live coding environment If your interview is in person have a workstation already set up If the interview is done remotely just have them share their screen with you as they work If you have multiple evaluators ensure that they are all present and able to watch the proceedings Ask the candidate to begin coding a single basic app It can be almost anything It could be a to do app or a tic tac toe app or a battleship app or anything If you need to see the candidate creating a deeply complicated esoteric feature that will implement live video streaming for your universe of authenticated users with content controls and dynamic tracking of ad placements you re doing it wrong Tell the candidate that they ll only be expected to code for an hour That s right One Single HOUR No more Also tell them that they are not expected to complete the app in this time If your idea of a coding assessment is to give candidates a task that will take hours to complete you re being a jerk and you re self disqualifying your company from considering many highly skilled vastly experienced candidates who simply can t be bothered to burn an entire afternoon working on your demo app Tell the candidate that they needn t concentrate on minute details of UX Unless the position is almost entirely focused on UX you shouldn t be getting hung up on whether someone has deployed a clean fancy responsive and intuitive lt Grid gt control You should be looking for coders Encourage them to talk through their solution as they re writing it Any clarification they can add is useful and will make the subsequent question and answer session far smoother Tell them that while they needn t complete the app if they want to stub out basic functions components features that they would normally implement that s fine Like if they would normally implement a wrapper for asynchronous calls it s perfectly OK if they just stub out that functionality without necessarily building it from scratch Let the candidate code the app in whatever language framework they prefer That s right ANY language framework If this sounds ridiculous to you then you re absolutely not screening for the right skills You re looking for people who just happened to have mastered your chosen tech stack You re not looking for hardcore coders And you should ABSOLUTELY be looking for hardcode coders Once the hour is done have the candidate stop coding They can keep the solution on screen But you should absolutely be respectful of their time and you should not be expecting them to extend their time so they can dot all the i s and cross all the t s The coding session should be followed by a question and answer session with the evaluators That session should also have a firm time control Thirty minutes is usually sufficient But an hour is not egregious If you really need to talk to them so much longer than an hour you probably weren t in love with their solution anyway and it s probably unlikely that you ll consider extending them an offer Annnnd that s it No really That s IT And right about now you re having an apoplectic right ObjectionsIf you re feeling a little triggered right now that s okay Really I get it This doesn t match your hiring process and every step in your sanctimonious hiring process is sacrosanct right So allow me to cover some of the most frequent whinings I encounter when proposing such a process We can t take all that TIME to watch all the candidates code for an hour So lemme get this straight You re thinking about offering this person a salary that in many regions may be well north of k You re gonna invest countless hours getting this person acclimated to your environment But you can t put in a few hours upfront with your team to actually watch this person code Think about that for a minute I recently did a coding challenge for a potential employer After coding the solution all by my lonesome for several hours they then had me meet with THREE of their most senior people to talk through the solution for more than an hour Then they scheduled a second call with the same people to talk through some of the finer details of what I d written FWIW I was offered the job but I didn t accept it But this is more time than you realize We have a LOT of candidates to assess Then your pre screening process is broken If you wanna see coding assessments from a dozen or more candidates then you either have a ridiculous bounty of unimaginably qualified candidates or your pre screening process needs to be sharpened a bit Let s just imagine for a moment that you do have a dozen or more candidates who all seem to be really strong I still find it hard to believe that some of those candidates aren t sitting closer to the top of your hierarchy And if there are some candidates who seem to be more qualified than others the answer is pretty simple Interview the strongest candidates first Then if for some reason those top candidates don t pan out simply move a little bit further down your list This isn t enough time for someone to demonstrate all the skills we need to see in a potential programmer Then you need to earnestly question the qualifications of your evaluators Seriously Every time I ve sat down to code with someone else or to simply watch them code for the first time I ve been able to get a pretty accurate read on their skill level And I usually have that read within MINUTES If you ve watched me code for a full hour and you re still not sure if I m knowledgeable enough to do the job then I guarantee that I m not But by forcing candidates to do a coding assessment on their own we save a lot of time because we can eliminate many candidates before we even need to bother pulling everyone into a live interview assessment Ahh yes So you re admitting that you re one of those jerks who thinks it s cool to ask an army of questionably qualified candidates to do your take home assessment meaning that you re asking them to do FREE WORK And when the submission doesn t pass your sniff test you ll just summarily terminate their candidacy Without even providing any feedback as to how exactly their submission failed Yeah Gotcha I know exactly what kind of employer you are I have no desire to work for you And guess what There s an ever growing community out there of extremely qualified candidates who have already come to the same conclusion We can t let people code in any language framework that they want because we need a true apples to apples comparison So what you re saying is that if your environment is entirely dependent upon Angular amp Node you don t think there s any way that my kick butt solution written in React oh no and C egads may be at all transferable to your tech stack If I truly wrote a solid solution in React C do you really think it s gonna take me some ungodly amount of time to translate those skills into Angular Node C mon mannn Trashing the Assessment If my previous suggestions have you tearing your clothes and gnashing your teeth then you re really gonna love this suggestion Sometimes you should absolutely consider bypassing the coding assessment altogether No I wouldn t normally suggest trashing your coding assessments altogether But you should really think about which tasks your asking of which candidates I have a fairly robust GitHub profile now It contains the code for live publicly accessible apps It contains the code for all of my NPM modules It contains the code for numerous other coding assessments This probably sounds hella arrogant And I couldn t care less But the simple truth is that if you re asking me to write some new little demo app when I already have tons of live high quality code that may even be directly applicable to your environment then your tests are often rather well annoying And I can already hear the hiring manager apologists who are saying things like Well if you can t be bothered to do our coding assessment which is really just another permutation of stuff that you ve publicly posted many times before then we don t want to hire you And that s great Seriously It is But keep in mind that your hiring process is almost certainly causing a lot of other extremely experienced candidates candidates who already have jobs and don t necessarily need your amazing opportunity to simply bow out of the process altogether |
2022-02-20 20:43:05 |
海外TECH |
DEV Community |
React Hooks: useRef() |
https://dev.to/fig781/react-hooks-useref-40m6
|
React Hooks useRef What are React hooks They are functions in React that allow you to add react functionality to function based components What is the useRef hookThis hook is used to track values between renders and access DOM elements The main difference between a ref and state is that updating a ref will not cause a re render This is especially useful if you want to track the number of renders of a component or when you want to track the previous state of a component The syntax follows a common pattern const refContainer useRef refContainer current In this case is the initial value of refContainer refContainer will always be formatted as current someValue Example using useRef to access a DOM node import useRef from react const App gt let element useRef const focusButtonClick gt element current focus return lt gt lt input ref element type text gt lt button onClick focusButtonClick gt Focus lt button gt lt gt export default App All React elements have a ref attribute that useRef can access Element is set as current lt input type text gt When the button is clicked the input is focused Example using useRef to track previous state import useRef useState useEffect from react const App gt const input setInput useState const previousState useRef useEffect gt previousState current will always update to the previous state previousState current input input return lt gt lt input type text value input onChange e gt setInput e target value gt lt p gt Current State input lt p gt lt p gt Previous State previousState current lt p gt lt gt export default App More information about useRef can be found in the React docs userefLeave comment if you have any questions or feedback |
2022-02-20 20:33:37 |
海外TECH |
DEV Community |
Introduction to Data Structures and Algorithms With Python. |
https://dev.to/am_eric/introduction-to-data-structures-and-algorithms-with-python-51fp
|
Introduction to Data Structures and Algorithms With Python Data StructuresPython has four inbuilt basic data structures which are Lists Dictionary Tuple and Sets To start with ListsLists can be used for any type of object From numbers to string and also lists Lists are defined by brackets numbers print type numbers output lt class list gt Lists can also be defined by using the keyword list numbers list numbers append numbers append numbers append print numbers There are set of built in methods used with lists append Adds an element at the end of the listclear Removes the elements of a listcopy Returns a copy of the listpop Removes the element at the specified positioninsert Adds an element at the specified positionreverse Reverses the order of the listsort Sorts the listremove removes the first item with the specified valuecount returns the number of elements with the specified value DictionaryDictionaries referred to as hashmaps in other languages It consists of key value pairs Key are unique and immutable objects Each key and value pair are seperated by a colon Dictionaries are defined by curly brackets Dict name Eric age There are also a set of inbuilt python dictionary methodsclear Removes all items from a dictionarycopy Returns a copy of the dictionaryget gets the value of the specified parameteritems gets all items of a dictionary in the key value formatpopitem Removes and returns the last element in the dictionaryupdate updates the dictionary with the key value pairskeys returns a list containing the dictionary s keysvalues returns a list of all the values in the dictionaryTupleA tuples is ordered and immutable Duplicates are allowed in tuples Tuples are defined with brackets and are indexed mytuple cat mouse cow chicken Tuples can be accessed through indexingmytuple cat mouse cow chicken print mytuple output mouseSetsSets are unordered immutable and unindexed Duplicates are not allowed in setsSets are defined with curly brackets myset cat mouse cow chicken There are built in set methods add Adds an element to the setclear removes all the elements from the setcopy returns a copy of the setdiscard removes the specified itempop removes an element from the setupdate updates the set with another setremove removes the specified item AlgorithmsQueuesA queue is an abstract data structure that is open on both sides hence use first in first out basis FIFO A queue has two ends front and rear The two operations involved with queues are enqueue and dequeue Enqueue involves inserting items in a queue while dequeue is the process of removing items Methods involved in queues include push item used to insert an element to the queue pop item used to remove an element from the queue get used to extract an element from the queue empty check whether a queue is empty or not full check whether a queue is full Implementation of queues using list in pythonq def Enqueue if len q size print Queue is full else number input Enter numbers q append number print number number added to the queue def dequeue if len queue print queue is empty else del q pop print Element removed del def display size input Enter size of the queue while True print Select the Operation Add Delete Display Quit choice int input if choice Enqueue elif choice dequeue elif choice display elif choice break else print Invalid Choice StacksA stack is a linear data structure that stores items in a last in First Out order A stack is open on one side hence a new item is added at one end and removed from that end only The methods involved with stacks are empty returns whether stack is empty size returns size of the stack top returns a reference to the topmost element of the stack push inserts items at the top of the stack pop Deletes the topmost element of the stack Implementation using liststack append used to push items into stackstack append a stack append b stack append c print stack pop removes items from stackprint stack pop print stack pop print stack pop elements after being poppedprint stack Linked ListsA linked list is a sequence of data elements which are connected via links Each link contains connection to another link Python does not have linked lists in its standard library The first node is also known as the HEAD It is used as a reference to traverse the list The last node points to NULL Types of Linked ListsSingly linked list traversed in forward directionDoubly linked list traversed in forward and back directionsCircular singly linked list the last element contains link to the first element as nextCircular Doubly linked list the last element contains link to the first element as next and the first element contains link of the last element as previous Implementation of nodes using classesclass Node constructor to create a new node def init self data self data data self next Noneclass LinkedList constructor to create an empty LinkedList def init self self head None create an empty LinkedList MyList LinkedList Add first node first Node linking with head nodeMyList head first Add second node second Node linking with first nodefirst next second Add third node third Node linking with second nodesecond next thirdThank you for reading this article I hope it was of great assistance understanding data structures and algorithms with python |
2022-02-20 20:26:49 |
海外TECH |
DEV Community |
Amplify, React and Typescript |
https://dev.to/swalker326/amplify-react-and-typescript-197i
|
Amplify React and TypescriptRecently I wanted to start a project with an aws backend I wanted to use typescript and create react app The guide on aws is all in vanilla react that won t do and in searching around I couldn t find a good example so I struggled through so you don t have to The AWS guide can be followed up until connecting the front end In the example I went with blogs instead of ToDo s my project was closer inline to blogs so it just made sense you can choose whatever data type you would like During the configuration make sure that you select typescript where you can This will make codegen create all the types you need for your front end The base project is created with npx create react app template typescript instead of the default create react app template The updated App tsx looks like this we ll break it down afterwards import React useState useEffect from react import Amplify API graphqlOperation from aws amplify import createBlog from graphql mutations import listBlogs from graphql queries import awsExports from aws exports import ListBlogsQuery from API Amplify configure awsExports const initialState name body const App gt const formState setFormState useState initialState const blogs setBlogs useState lt ListBlogsQuery gt useEffect gt fetchBlogs const handleInputChange event React ChangeEvent lt HTMLInputElement gt gt setFormState formState event target name event target value const fetchBlogs async gt try const blogData await API graphql graphqlOperation listBlogs as data ListBlogsQuery setBlogs blogData data catch err console log Error fetching blogs err const addBlog async gt try if formState name formState body return const blog formState if blogs await API graphql graphqlOperation createBlog input blog await fetchBlogs setFormState initialState catch err console log error creating blog err return lt div id wrapper style styles container gt lt h gt Amplify Todos lt h gt lt input onChange handleInputChange name name style styles input value formState name placeholder Name gt lt input onChange handleInputChange name body style styles input value formState body placeholder Type your blog gt lt button style styles button onClick addBlog gt Create Blog lt button gt blogs amp amp blogs listBlogs items map blog index gt return lt div key blog id index style styles todo gt lt p style styles todoName gt blog name lt p gt lt p style styles todoDescription gt blog body lt p gt lt div gt lt div gt const styles container width margin auto display flex real weird issue flexDirection column as column justifyContent center padding todo marginBottom input border none backgroundColor ddd marginBottom padding fontSize todoName fontSize fontWeight bold todoDescription marginBottom button backgroundColor black color white outline none fontSize padding px px export default App Imports are pretty straight forward we ll be using graphql and we need to import the queries and mutations that we ll use to fetch and update our blogs This bit is pretty important This holds the state of the form we use to create new blogs fairly common The next line is holding the blogs that we fetch from our backend note the type notation is a ListBlogsQuery this is a type that is created for us by codegen when we push out backend to aws The useEffect fetches our posts on page load again pretty standard stuff const formState setFormState useState initialState const blogs setBlogs useState lt ListBlogsQuery gt useEffect gt fetchPosts The fetchBlogs and addBlog methods were tricky for me I had never used the as data lt Type gt syntax so it took me a minute to fully understand what I was doing const fetchBlogs async gt try const blogData await API graphql graphqlOperation listBlogs as data ListBlogsQuery setBlogs blogData data catch err console log Error fetching blogs err const addBlog async gt try if formState name formState body return const blog formState if blogs await API graphql graphqlOperation createBlog input blog await fetchBlogs setFormState initialState catch err console log error creating blog err I m not going to cover the rest of the content as its pretty standard react stuff One note is the super weird issue I ran into with flexDirection column If you note in my styles there is a link in a comment to explain more Anyway thats about it I m happy with it and I hope someone else gets some use out of it |
2022-02-20 20:23:02 |
海外TECH |
DEV Community |
Tips & Tricks that will make you a better ReactJS Developer |
https://dev.to/naira_gezhoyan/tips-tricks-that-will-make-you-a-better-reactjs-developer-4pan
|
Tips amp Tricks that will make you a better ReactJS DeveloperCoding as a profession requires constant and continuous learning problem solving and staying up to date on the various helpful tools that are available out there Developers need to always be on the lookout for easy wins I appreciate developers who share their knowledge and I want to share some tricks that help me in React projects development React only takes care of the view layer of an application it doesn t enforce any specific architecture such as MVC or MVVM This can make it difficult to keep your codebase organized as your React project grows So here are useful and time saving tricks that you can use while developing your React apps Good architecture makes the system easy to understand easy to develop easy to maintain and easy to deploy The ultimate goal is to minimize the lifetime cost of the system and to maximize programmer productivity Robert C Martin Component ImportsUsing absolute imports you can alias folders like below import MyComponent from components MyComponent import useFetchData from hooks useFetchData To set up absolute imports in your application add update your tsconfig json file if you use Typescript and jsconfig json if you use Javascript in the root directory of the project Then you need to update the compiler option baseUrl in the file compilerOptions baseUrl src include src Custom HooksIf you want to become a better React programmer the best thing you can do is take the time to fully understand hooks Need to perform side effects useEffect is for your friend Need to keep track of state between renders and rerender when that state changes useState has your back Need to store and update a value between renders without rendering Or need to look up the height or width of a DOM element useRef is your friend Keeping state business logic separate from UI Rather than writing the logic for placement of the state inside a component better to follow the Don t Repeat Yourself DRY principles write code once and extract it into a hook of its own and related logic can be tightly coupled in a custom hook Let s create a custom useFetch hook for API calls import useEffect useState from react const useFetch url method GET body gt const isLoading setIsLoading useState false const data setData useState const isError setIsError useState false useEffect gt if url return setIsLoading true const fetchData async gt try const response await fetch url headers Content Type application json method body JSON stringify body const data await response json setData data catch error setIsError error finally setIsLoading false fetchData url method body return isLoading data isError export default useFetch Fetching data in component using useFetch custom Hookconst isLoading data isError useFetch GET Single Responsibility of React ComponentsTo make your code as reusable as possible it s important to make your components as reusable as possible The motto is the reduction of the complexity of the components Components in React have two forms stateful or stateless The best move in this case is that you can have one stateful component to load data and another stateless component that can help in displaying the data The stateless component general rule is that they can just receive props inputs from the parent component and return u JSX elements Such components become scalable and reusable and similar to the pure function in JavaScript Abstract away the purely presentational parts We end up with two components our List component and our Item component import useFetch from hooks useFetch const List gt const isLoading data isError useFetch return lt gt isLoading amp amp lt p gt Loading lt p gt lt ul gt data length gt amp amp data map info gt lt Post key info id info gt lt ul gt lt gt const Post img name author gt return lt li gt lt img src img gt lt div className name gt name lt div gt lt div className author gt author lt div gt lt li gt When to use Global vs Local StateFor React state management you can choose many different solutions like a Redux mobx recoil context API etc No hard and fast rule tells you when you should keep things in local versus global state Some rules for when to use global stateDo other unrelated components in the application need access to this data example username display it in the navbar and on the welcome screen Should the data be persisted as you move between pages Is the same data being used in multiple components If the answer is yes to any of these questions you may want to use a global state But don t put the open state of your menu inside of the global state Try to reason about needs to be shared across your application and what can live inside of a local component CMS allows you to add components to your ReactJS apps in minutesThe content management system allows developers to create store manage and publish the content over an API A headless CMS comes with an API friendly approach which makes it possible to publish content through an API either RESTful or GraphQL It allows you to use the same API to deliver content across various channels such as Websites Android or IOS apps etc A headless CMS gives developers the ability to harness creativity quickly Try it out with Cosmic it s easy and fast Share your thoughts of some other ways to improve as a React developer Let me know in the comments |
2022-02-20 20:21:54 |
海外TECH |
DEV Community |
New software devlog channel |
https://dev.to/c0der4t/new-software-devlog-channel-4f7i
|
New software devlog channelHey all I know this is likely the wrong place to post about this but I am starting a new software devlog series I m not building games I am building software that I release to the public If it sounds like fun go check out the channel trailer I just uploaded |
2022-02-20 20:20:11 |
海外TECH |
DEV Community |
Blockchain DevOps on AWS with The Hyperledger Fabric Model and Golang (1) |
https://dev.to/theghostmac/blockchain-devops-on-aws-with-the-hyperledger-fabric-model-and-golang-1-4k1i
|
Blockchain DevOps on AWS with The Hyperledger Fabric Model and Golang The BlockchainThe Blockchain is an encrypted database of transactions stored in a distributed ledger Blockchain transactions are exchanges of value in the form of digital money and the transactions are stored on a ledger to record the transactions Transactions are immutable verifiable and incorruptible Blockchains operate with decentralized technology hence have no single point of failure Smart Contracts are pieces of code that control actions on a blockchain network They are similar to the business logic of Web To add entries to a shared ledger a smart contract must be executed Consensus protocols are what regulate and decide which node computer peer can add entries to a blockchain Consensus protocols are what empower these nodes to be able to agree upon the transactions that get addedthe order of transactions to be addedOnce nodes accept a blockchain transaction the transaction gets stored permanently on the blockchain network The Hyperledger ProjectHyperledger is not a blockchain company or cryptocurrency It is a parent project of open source blockchains and tools started in December by the Linux Foundation It is made up of three components Developers and communitiesFrameworks and toolsIndustries like finance IoT supply chain and manufacturingDevelopersThe developers of the Hyperledger Projects are blockchain specialists who are also developers working in different industries and who want to see the blockchain technology used in diverse fields Frameworks and ToolsFrameworks include the following Hyperledger Fabric by IBMHyperledger SawtoothHyperledger Iroha for mobile appsHyperledger Burrow built to support the EVMHyperledger Indy which supports independent identities on distributed ledgersHyperledger Cello for deploymentHyperledger Composer for UIHyperledger Caliper for benchmarkingHyperledger Explorer for monitoring application statusIndustriesIBM Intel Wells Fargo etc are examples of companies who are involved in the Hyperledger Project Deep Dive in ComparisonEthereum is an open source public blockchain based platform that is used to build smart contracts Ethereum has a cryptocurrency called Ether used to reward nodes for work done on the network The smart contracts are written with language such as Solidity Ethereum has problems with scaling and speed The Proof of Work algorithm consumes relatively more computing power and resources Also each transaction in the Ethereum network gets broadcasted to all nodes in the network discouraging the idea of confidentiality These issues are behind the creation of the Hyperledger Project Hyperledger FabricThe Hyperledger Fabric framework is an open source enterprise grade permissioned distributed ledger technology platform designed for use in an enterprise application Hyperledger Fabric is used to build private blockchain networks where all nodes are known and verified “Known does not mean trustworthy but that the peers on the network are not anonymous Advantages of Hyperledger FabricThe following are advantages of the Hyperledger Fabric framework It is permissionedUnknown peers are not allowed to participate and there are private channels between the peers Membership Service Providers MSPs are used to regulate the peers who join the network Verification is important and compulsory in Hyperledger Fabric Channels can also be set up to allow for private communication between subsets of nodes These private channels have private ledgers that no external node can access Transactions are fastThere is low latency and high throughput for verifying and accepting transactions Transactions on Hyperledger Fabric are executed using smart contracts also but they are called Chaincodes in Hyperledger Fabric Hyperledger Fabric Chaincodes are written in languages such as Golang or NodeJS They are not written with contract purpose programming languages like Solidity Chaincodes have standard interfaces with two methods the init and invoke methods to initialize the smart contract and to invoke or execute the smart contract respectively The execution of a transaction through a smart contract is done by a few endorsing peers The percentage of the peers endorsing the transaction is determined by an Endorsement Policy However the execution does not update the actual ledger Instead endorsed transactions are passed down to Orderers Orderers determine the sequence of the transaction Ordering is of different types SOLO OrderingKafka distributing systemPractical Byzantine Fault ToleranceNext the transaction is passed on to Committing peers The Committing peers of that particular Hyperledger Fabric network are responsible for validation and “merging or committing the transaction to their private ledger copy They only accept validate correctly endorsed transactions and verify that the transaction is valid with the latest version of the shared ledger If the transaction is found wanting they are invalidated by the Committed peers The lifecycle of a transaction on the Hyperledger Fabric network makes the issue of double spending inexistent and makes sure that the sender has the asset they want to send Easy to PlugIt is designed to be modular so developers can use different databases membership service providers consensus algorithms etc A Transaction s Lifecycle on the Hyperledger FabricA client application submits a transaction proposal to Endorsing peers through a Chaincode or smart contract The Endorsing peers execute the Chaincode and endorse the transaction The transaction is then sent back to the client application with signatures The client application then sends the signed transaction to Orderers Once the Orderers order the transaction they pass it on to the Committing peers who perform their duty as explained above and add the transaction to their private copy of the ledger The Committing peers then send the Confirmation of the transaction to the client application Transactions involve hardware assets or software assets apparently anything of monetary value that can be exchanged between two parties Hyperledger Fabric vs EthereumThe following are highlights of the differences between Hyperledger Fabric and EthereumEthereum is permission less Hyperledger Fabric is permissionedPeers have to be verified known and approved to be part of the private Hyperledger Fabric platform In Hyperledger Fabric not all users can validate or endorse transactions but it is so on Ethereum Hyperledger Fabric does not have a cryptocurrency to incentivize nodes for reward of work done Ethereum has the Ether cryptocurrency for this In Hyperledger Fabric transaction execution mechanism is with Chaincodes and not Smart Contracts as in Ethereum The transaction lifecycle on Hyperledger Fabric involves execute transaction ー gt order the transaction ー gt validate the transaction In Ethereum it involves order the transaction ー gt then execute the transaction Validation does not exist separately in Ethereum Transactions can be kept private from some peers in the Hyperledger Fabric network but in Ethereum all transactions are broadcasted to all nodes in the network General purpose languages like Go Node js and Java are supported on Hyperledger Fabric but contract purposed domain specific language like Solidity is used on Ethereum On Hyperledger Fabric the consensus protocol is broad and generic On Ethereum it is Proof of Work soon Proof of Scale Little effort and resource is wasted in Hyperledger making it scale far more easily than Ethereum which consumes much more effort and resource AWS Blockchain TemplatesAWS Blockchain Templates supports two blockchains Verify this EthereumHyperledger FabricOnly build on the Hyperledger Fabric if you want to a private network for your organization as only known and verified peers are allowed AWS Blockchain Templates specify the network components of your blockchain platform with a network configuration file You can also run Chaincode or DApps on the AWS Cloud The following are tools on the AWS Cloud that will be used in building the Hyperledger Fabric platform AWC EC to configure peers orderers and the ledgerAWS ECR Docker container registry to provision containers for nodesAmazon VPC to provide private network access to cloud resourcesAWS Security Groups for controlling traffic flows to and from the network AWS Roles for access controlAWS CloudFormation Stack for the blockchain network ConclusionThis article presents a swift guide to the Hyperledger Blockchain platform The Hyperledger Fabric framework is explained and compared to the popularly adopted Ethereum blockchain The next article will take a more technical approach to practice some DevOps principles using the AWS Blockchain Template explained in this article to build a private Hyperledger Fabric network with the Go programming language You can learn more about the Hyperledger Project here |
2022-02-20 20:20:02 |
海外TECH |
DEV Community |
Keystone.js 101 |
https://dev.to/eabald/keystonejs-101-3kbo
|
Keystone js Photo by Bicanski on Pixnio IntroductionSome time ago I was working on small project consisting website and app to collect research data It s a kind of project I am typically working at for my clients In most cases my stack for that kind of project consists of WordPress as headless CMS Next js front and custom built Node js app for data collecting But often I feel this is kind of overkill Especially in that last case So I decided to look for better solution best in the way to solve CMS and data collecting app in one After brief research I ve decided to stick to Keystone js it has all I need But also it required a bit of customization more about in previous articles here and here These customizations were so interesting I ve decided to write about them but when I was writing last article I realized that they were pretty niche and specialized And there s hardly any introduction to Keystone js in its newest version released at the end of last year And that s why I ve decided to take brake from writing about custom fields and components and concentrate on simple beginner friendly introduction to Keystone New version of Keystone js was released at the end of Basically it s CMS system build with Express js backend and admin UI in Next js But also it s features packed including types safe Prisma ORM and TypeScript to elevate developer experience as stated in release blog post We extended Keystone s foundations in Node Express and JavaScript by adding Prisma to take care of the database layer and NextJS to power Keystone s Admin UI We also introduced a strongly typed developer experience to make Keystone the most advanced TypeScript Headless CMS Thanks to usage of Prisma Keystone can generate migrations every time there s update in data schema It definitely allows co concentrate on building application business logic without concern about low level implementation details In some cases it may not be what we want but in general it s nice to have it working out of the box There may be some performance issues due to ORM s issue with N queries but it can be mitigated easily Additionally we have here built in support for GraphQL what is always pleasant Ok all that features are rally impressive but what use case is prefect for Keystone First it s CMS so managing content for websites landing pages or blogs with custom frontends are usages where it shines But not only due to its wide possibilities of creating data structure it can be used in many more cases E g e commerce ー the challenge is only in designing right models for cart and products additional functionalities like payment processing can be added using built in extensibility of underlying Express js InstallationI think It s the high time to get our hands dirty and start our own Keystone instance DependenciesBasically only thing we require to have is Node js installed Out of the box Keystone comes with SQLite so there s no need for additional database But always we can switch to PostgreSQL for now I am gonna stick to first option in sake of simplicity Let s startTo begin with we only require one command Open your terminal and type npx create keystone appFirst CLI will ask for name of our app let s try simple keystone blog Next as prompted cd into that folder assuming You are using Linux or Mac if You need use Windows equivalent commands and start project with yarn dev and open http localhost in browser Here You can set initial user account and login into admin dashboard Out of the box there are two lists already created User and Post so we have all the basics to start writing a blog Also we can access all the data via GraphQL API or use sandbox accessible under http localhost api graphql Files structureOk let s have a look on the files structure in our project First two folders contains auto generated views for admin UI third dependencies to NPM packages keystone db schema graphql and schema prisma are database itself GraphQL and ORM configuration each one is also auto generated based on our changes Last three important files are keystone ts auth ts and schema ts First contains whole configuration of our project ー database configuration and imported from other two auth session settings and lists definitions Auth settings work really nice out of the box and I won t focus on them If You are curious of them check the docs Much more interesting are lists settings let s have a look on them Schemas This file exports object of type of Lists which contains configurations for all the lists visible and invisible in admin UI There are three defined here User Post and Tag Each one calls function list with additional configuration object This object can have up to six properties but only one is mandatory ー fields It holds list of all the fields in that list with their additional config Amount of field types here is not huge but it s enough for all basic needs more it contains fields for all data types files and images relations to other lists and rich text editor Rest of the props holds more advance configuration options like display options in ui prop side effects associated with this list in hooks prop additional database or GraphQL config in db and graphql Additionally some of this config properties can be used directly on the level of each field to extend their functionality All this config options gives us wide possibility to build complex schemas for each list including side effects allowing to integrate external tools and extend it further In topic of extensibility there are two additional things worth mention On top of all the fields in main config object keystone ts we can modify setting of underlying Express js server Options here are pretty basic except one ー extendExpressApp Basically this option allows us to add more REST endpoints or middleware to our backend Second important option is extendGraphqlSchema generally it does the same job as previous one but allows adding custom GraphQL resolvers SummaryI know I ve barely scratched the surface of what really Keystone js can do but on the other hand I hope I ve showed the real potential in it At first glance it looks like pretty basic CMS with limited options But when we dig deeper there are tons of possibilities and after careful planing and clear requirements it may turn out that we don t need to build another custom system Instead use something nice as a base and extend it That s the third article in series about Keystone js In this one I ve decided to take step back and get to basics I hope it s enough to convince You to give it a try Next week I m getting back to series and custom components this time we are going to extend JSON field and use it as data for building pages navigation menu |
2022-02-20 20:17:30 |
海外TECH |
DEV Community |
An Introductory Guide To Concurrent Rendering |
https://dev.to/keraito/an-introductory-guide-to-concurrent-rendering-54e6
|
An Introductory Guide To Concurrent RenderingThe hottest topic in the React field right now is the React release In particular the release will introduce a set of so called concurrent rendering features These features allow developers to opt into the concurrent rendering mechanism from React This mechanism opens up an entirely new world of opportunities for React developers to control and optimise the experience of end users It is definitely one of the most exciting things we ll receive in the world of React since hooks Because of this it s very likely that you ve heard about concurrent rendering before Maybe articles about it the APIs around it or what React will bring to the table for it However you might be left wondering about the fundamentals of concurrent rendering What is concurrent rendering exactly and why do we actually need it To help you with understanding the fundamentals this article will go over those questions By looking into its purpose what problem it attempts to solve and how it solves it you ll gain a solid foundation of knowledge regarding the topic of concurrent rendering Why do we need concurrent rendering One of the issues with React in its current form is that all state updates are synchronous This means that React is only able to handle them one by one In a lot of use cases and real life scenarios this is perfectly fine and won t impose any limitations on the user experience But in scenarios where React would like to pick up a different state update than the one it s currently working on that s plainly impossible right now React is not able to interrupt pause or drop rendering an update after it has started ーit s a blocked process In essence this puts an upper limitation on the process of optimising user experience Although it s a very high one there still exists a limit Every state update is treated as equally important even if that doesn t hold for the user experience Certain updates can have more priority or urgency than others Not being able to do so actually negatively impacts the user experience tremendously compared to what it could be which is suboptimal What is concurrent rendering This is exactly where concurrent rendering comes in Concurrent rendering is a set of features that allow your React project to opt into so called interruptible rendering Contrary to the previous rendering process where React was blocked this makes the rendering process interruptible from React s side This opens up a lot of new possibilities for React developers to further enhance the user experience of React applications It allows React to handle multiple state updates at once However it doesn t mean that React will suddenly perform all the queued state updates simultaneously at once Rather opting into concurrent rendering allows React to think about its best course of action Fortunately it s also something that we as developers can control Let s say React is currently working on a state update and a different one comes in then React can make different decisions based on a variable of factors If the new incoming state update is marked as equally or less urgent then nothing will change compared to the previous rendering process React will proceed with the current state update like normal After it finishes it ll pick up the new state update But if the new incoming state update is marked as more urgent then React can decide to pause the current state update and handle the incoming one first After finishing the new and more urgent state update React will then go back to the original state update If it determines that it s necessary to resume it it ll do so If it turns out that the state update is now irrelevant it can decide to drop it altogether What s NextThis article briefly covered one of the most exciting features that React will bring to the React development field namely concurrent rendering and get you up to speed with the entire topic using the knowledge in this article you should know what concurrent rendering is understand what problem it attempts to fix and have an overview of how it works Luckily concurrent rendering doesn t stop here While there are so much more aspects to concurrent rendering to understand or dive into this article serves as an introduction to get into the whole topic and allows you to further explore React starting from here To give you some pointers This previous article of mine goes over the three new APIs that were introduced in React All of them are hooks that allow certain developers to opt into concurrent rendering in certain scenarios The official React announcement is a great place to find out more about React different features how to adopt it and in general everything you need to know about the upcoming React release The React working group repository is a great place to learn more about the technical aspects receive even more pointers learn about the thought processes behind different APIs and features and in general get a more in depth perspective of everything in React That s all there is Now that you have a solid grasp on the topic of concurrent rendering a whole new world opens up for you to explore in React Go out there explore and enjoy this new adventure If you liked this article consider checking out the other entries in the Uncommon React newsletter or my Twitter for future updates If you like my content in general you could consider sponsoring me with a coffee to keep me going |
2022-02-20 20:11:34 |
海外TECH |
DEV Community |
Beginners Guide to Typescript and Will It Replace JavaScript in the Future |
https://dev.to/petronijevicm/beginners-guide-to-typescript-and-will-it-replace-javascript-in-the-future-349n
|
Beginners Guide to Typescript and Will It Replace JavaScript in the Future of JS programmers already use TypeScript and wish to try Why In this article we are going to answer those questions By the end you ll have a grasp of the following What TypeScript is Main features of TypeScript Why you should use TypeScript TypeScript basics to get you started Introduction What is TypeScript TypeScript is a superset of the JavaScript language which means that it contains all features of JavaScript and expands on them with static typing classes and interfaces meaning it is an Object oriented language It has become increasingly popular in the past few years It is also better structured and concise TypeScript is a statically typed language and it permits checking type accuracy at compile time Will it replace JavaScript JavaScript still has its place especially when working with smaller projects TypeScript also compiles to JavaScript since it can t run directly in the browser But for large companies it just makes more sense to use tools more capable of scaling However You can t just take a JavaScript team or a JavaScript repository and instantly switch them to TypeScript There are tradeoffs and upfront time sacrifices that have to be made There is no way to know what the future holds but for now it seems that the future for Typescript is bright considering the growth trend from the last couple of years Getting started You can install TypeScript globally by running this command npm install g typescriptIf you don t wish to install globally you can just run this npm install save dev typescriptAfter installing TypeScript we need to initiate a new project You can do that by running the following command tsc init This will create a tsconfig json file in the root directory of the project All compile options for the project can be changed in the tsconfig json file under the compileOptions key You can leave it as is for now And now we are ready just create a ts file and you can begin fiddling around alternatively you can just rename a js file in ts since code is mostly compatible Here is a simple hello world program you can test let message string Hello World console log message Compilingtype the following command on the Terminal to compile the app ts file tsc app tsIf everything is fine you ll see that a new file called app js is generated by the TypeScript compiler What s nextNow that we broadly know what TypeScript is and what it does what can we do next In the next couple of articles we will be going through the basics of Typescript classes types functionsand moreLook out for the upcoming articles if you are interested in learning TypeScript with me |
2022-02-20 20:04:55 |
海外TECH |
DEV Community |
Serverless MERN Stack |
https://dev.to/bronifty/serverless-mern-stack-3jpn
|
Serverless MERN StackConvert MERN Stack to ServerlessDrop in replace code for Vercel Netlify amp AWS LambdaApp running on VercelGithubYoutubeNote MERN project samples from John Smilga Node Projects tutorial part |
2022-02-20 20:02:41 |
海外TECH |
Engadget |
The batteries in Google’s Nest Cam and Doorbell won’t charge in freezing weather |
https://www.engadget.com/google-nest-cam-doorbell-cold-weather-charging-issues-203635442.html?src=rss
|
The batteries in Google s Nest Cam and Doorbell won t charge in freezing weatherFollowing months of reports Google has confirmed its battery equipped Nest Doorbell and Cam devices won t charge when they re subjected to extreme cold weather quot At temperatures below freezing the lithium ion battery in your Google Nest camera or doorbell won t be able to charge quot the company said in a recently published support document spotted by toGoogle According to Google the battery versions of the Nest Doorbell and Cam can operate at temperatures as low as minus four degrees Fahrenheit minus degrees Celsius provided their batteries have power left That said those cells won t charge at temperatures below the freezing mark What s more Google warns they may drain faster than usual in cold weather with battery life potentially halved when the devices are near their operating limit The company recommends you bring your Nest Doorbell or Cam indoors in those situations The warmer the battery gets the faster it will charge according to Google You can look to the Home app to know if you should take your devices inside The software will display a notification that says quot Charging paused quot or quot Charging slowly quot with a lengthy estimated charging time when cold weather is negatively affecting them One other thing to note is that freezing temperatures may impact your Nest devices even if they re wired to your home s electrical system That s because the Nest Doorbell still draws on its battery for power even when it has an electrical connection At temperatures below the degrees Farhenheit mark the trickle charge coming from the wire won t help the battery And once it dies you ll need to bring the device inside to charge it once again By contrast the Nest Cam can operate with an empty battery as long as it s wired to your home but should you lose power and the battery is dead it won t work anymore until you charge it again In short if you re cold there s a good chance your Nest device is too Bring it inside for a break from the desolate winter nbsp |
2022-02-20 20:36:35 |
海外TECH |
CodeProject Latest Articles |
Azure IoT Hub Tester |
https://www.codeproject.com/Articles/1173356/Azure-IoT-Hub-Tester
|
azure |
2022-02-20 20:58:00 |
海外科学 |
NYT > Science |
The C.D.C. Isn’t Publishing Large Portions of the Covid Data It Collects |
https://www.nytimes.com/2022/02/20/health/covid-cdc-data.html
|
analyses |
2022-02-20 20:46:50 |
ニュース |
BBC News - Home |
Storm Franklin: Flooding and evacuations as storm nears UK |
https://www.bbc.co.uk/news/uk-60452334?at_medium=RSS&at_campaign=KARANGA
|
heavy |
2022-02-20 20:37:54 |
ニュース |
BBC News - Home |
Credit Suisse denies wrongdoing after big banking data leak |
https://www.bbc.co.uk/news/business-60456196?at_medium=RSS&at_campaign=KARANGA
|
customers |
2022-02-20 20:26:43 |
ニュース |
BBC News - Home |
La Liga: Pierre-Emerick Aubameyang scores first Barcelona goals in Valencia win |
https://www.bbc.co.uk/sport/av/football/60456824?at_medium=RSS&at_campaign=KARANGA
|
valencia |
2022-02-20 20:53:19 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ヤマト運輸の現場は「家に帰れる刑務所」、EC物流激増なのに専門部隊を解体する内部事情 - 物流危機 |
https://diamond.jp/articles/-/296530
|
電子商取引 |
2022-02-21 05:25:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
トヨタはなぜパナソニックを「見捨てた」のか、70年の蜜月・愛憎・破局の全経緯 - 絶頂トヨタの死角 |
https://diamond.jp/articles/-/295843
|
電池 |
2022-02-21 05:20:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
セブン&アイDX担当役員が「DX敗戦」に緊急反論!幹部退任の理由、全社員に伝えたこと… - セブンDX敗戦 |
https://diamond.jp/articles/-/296806
|
執行役員 |
2022-02-21 05:15:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
日本郵船「純利益9300億円」の衝撃!超絶“海運バブル”のカラクリと賞味期限 - 海運バブル “コロナ最高益”の不安 |
https://diamond.jp/articles/-/296550
|
感染拡大 |
2022-02-21 05:10:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
出世するコンサルタントが「ナナメ上」を見て仕事をする深い理由 - コンサルのキャリア論 |
https://diamond.jp/articles/-/286108
|
出世するコンサルタントが「ナナメ上」を見て仕事をする深い理由コンサルのキャリア論就活生や転職希望者からの人気が高いコンサル業界。 |
2022-02-21 05:05:00 |
ビジネス |
電通報 | 広告業界動向とマーケティングのコラム・ニュース |
サステナビリティのために日本人は、「安くていいもの」を手放せるか? |
https://dentsu-ho.com/articles/8087
|
意識調査 |
2022-02-21 06:00:00 |
ビジネス |
東洋経済オンライン |
男性に不満を持つ「韓国女性たち」の容赦ない本音 「男vs.女」バトルが激しさを増す韓国のリアル | 「韓国フェミニズム」知られざるその後 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/511454?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
東洋経済オンライン |
2022-02-21 05:40:00 |
ビジネス |
東洋経済オンライン |
2022年度診療報酬改定で今後の医療はどうなる? 従来と一味違う改定、医療制度改革案も提示 | 岐路に立つ日本の財政 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/512857?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
医療保険 |
2022-02-21 05:20:00 |
コメント
コメントを投稿