投稿時間:2022-04-19 10:32:19 RSSフィード2022-04-19 10:00 分まとめ(36件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 「生娘をシャブ漬け戦略」で大炎上! なぜ吉野家の役員は“暴言”を吐いたのか https://www.itmedia.co.jp/business/articles/2204/19/news056.html itmedia 2022-04-19 09:38:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 大分県初の「アパホテル」誕生 別府の観光客需要を見込む https://www.itmedia.co.jp/business/articles/2204/19/news076.html itmedia 2022-04-19 09:30:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 動物園がアマゾン活用 「ほしい物」をリストで直訴 https://www.itmedia.co.jp/business/articles/2204/19/news081.html itmedia 2022-04-19 09:29:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] メタバース普及へルールづくり検討 推進協会見 https://www.itmedia.co.jp/business/articles/2204/19/news080.html ITmediaビジネスオンラインメタバース普及へルールづくり検討推進協会見次元の仮想空間「メタバース」の国内普及を目指し、の企業・団体の参加で月末に発足した一般社団法人「メタバース推進協議会」が日、東京都内のホテルで記者会見を開いた。 2022-04-19 09:27:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 2022年冬アニメの満足度 「ジョジョ」「鬼滅の刃」を抑えた1位は? https://www.itmedia.co.jp/business/articles/2204/19/news077.html thefinalseasonpart 2022-04-19 09:07:00
AWS AWS Japan Blog 詳解: Amazon Elastic Container Service と AWS Fargate のタスク起動レートの向上 https://aws.amazon.com/jp/blogs/news/under-the-hood-amazon-elastic-container-service-and-aws-fargate-increase-task-launch-rates/ これらの長期間実行を前提とするアプリケーションのタスクと並んで、AmazonECSはスタンドアロンのタスクの起動にも使用されます。 2022-04-19 00:01:24
デザイン コリス Web制作にすごい役立つ! コードの軽量化や整形・ファビコンやQRコード作成・PDF変換など、便利ツールが一箇所で利用できる -ToolsOcean https://coliss.com/articles/build-websites/operation/work/free-online-web-tools-toolsocean.html 続きを読む 2022-04-19 00:36:21
python Pythonタグが付けられた新着投稿 - Qiita 動画ファイルを簡単にチャプター付きで結合します https://qiita.com/dev2dev2022/items/5b2634c08861a0dc396d mpmkv 2022-04-19 09:59:32
python Pythonタグが付けられた新着投稿 - Qiita Pyenv + PoetryでPythonの環境を作る。(覚書) https://qiita.com/ShiroUz/items/68942226265475c67f58 pyenvversion 2022-04-19 09:14:57
python Pythonタグが付けられた新着投稿 - Qiita EnvaderでPythonの環境構築を学んだのでmacで実践してみる(第1回) https://qiita.com/a-min3150/items/bf2e575668cc986dd5d9 envader 2022-04-19 09:14:23
js JavaScriptタグが付けられた新着投稿 - Qiita 配列の最後の要素を取得する方法【JavaScript】 https://qiita.com/y-suzu/items/1bff89e209b5f38a1069 constlast 2022-04-19 09:40:36
js JavaScriptタグが付けられた新着投稿 - Qiita パッケージ管理システムとは【npm】 https://qiita.com/y-suzu/items/26a79305123766999445 関係 2022-04-19 09:36:45
AWS AWSタグが付けられた新着投稿 - Qiita DatabricksのAWS Graviton有効化クラスター https://qiita.com/taka_yayoi/items/217fcdc30e2020d9994b awsgraviton 2022-04-19 09:41:01
技術ブログ Developers.IO 【Braze】コンテンツブロック作ってみた https://dev.classmethod.jp/articles/braze-make-contentblock/ braze 2022-04-19 00:23:24
海外TECH DEV Community Context In React https://dev.to/georgeoffley/context-in-react-4fda Context In React Table Of ContentsIntroductionData In ReactContext In ReactContext In UseConclusion Introduction React offers the ability to build out web applications quickly One of the details of this strategy includes passing data to different components in the DOM This can consist of needed data to build features states of a component and anything you can think of Data In React One great pattern in React is how data can be passed through the different components However this can get messy An application might be broken down like below A collection of components Some of these components return other components These are called parent components and their children are nested components We can pass data back and forth throughout the lifetime of each component Working with only props for example lets us pass data down the tree to the components that need it However this can present a problem Using props or properties is a great way to handle data However the deeper the component is buried the more you have to pass the props down This is called prop drilling Using the workflow above we have a couple of nested components passing the Username prop down the tree The Page and MainContent props are just passing down the props used by the UserCard component like a vertical game of telephone Now combine this with having to scale out your context to include hundreds of bits of data or state which need to be passed down to various components at various levels of the tree and we ve got a problem Context in React Context solves the problem by allowing us to pass down data without relying on continually passing props through components Context in React should be used handling global data that does not have to change often Using context to keep track of our username state improves the workflow by allowing components to use context as needed without passing it down the tree Pictured below As illustrated above we can provide the context to one component and the children component will be able to access the context regardless of the level they are at All without needing to have their parent components pass the data down Context In Use So let s look at an example of context I created a small React app and just made some barebones components The first file we should check out is the App component There are some lines of note as you ve undoubtedly seen and then some other stuff needed for using context The first out of place thing is using the React function React createContext which we use to create a context object We also made a provider for our context object and wrapped our Page component in it Context works using Providers and Consumers In this case we are looking to provide the context to our app for consumption by the components So we use the provider tag which every context object has to pass in the value string to our nested components The value attribute is a prop that the provider accepts and can pass down the tree Many consumers can subscribe to one provider and we ll talk about that more We re not passing anything to the Page component except the Header and MainContent components Let s look at the Header component The header is a regular old React component However we use the React hook React createContent to subscribe to the UserContext object that we import into this component from the App component We can now use the curly brackets to pass in the userNameContext into the JSX being returned by the component Let s look at another example Below we have our MainContent component Just another component with a nested component UserBox Let s look at what is in the UserBox component The UserBox component can do as our header did import the context object subscribe to the provider using the useContext hook and pass in the context using that context object This is cool because we re using context two levels below from where it was created without passing props through subsequent components The app would look something similar to the below image We can see the username string in the header and the UserCard components I am not one for styling things effectively so hold your judgments Conclusion Changing the value of the state would cause a render for the other components subscribed to the context So it could cause issues if the state is constantly changing So context fits nicely with a global state that is not likely to change often The code for the above example can be found on my GitHub This has been an interesting learning experience I m happy to have gotten one of the fundamentals of React down on paper so to speak I hope this helps someone new coming into the React scene George 2022-04-19 00:44:38
海外TECH DEV Community Desacoplando a camada de domínio de uma aplicação das outras camadas https://dev.to/2020nani/desacoplando-a-camada-de-dominio-de-uma-aplicacao-das-outras-camadas-2b0b Desacoplando a camada de domínio de uma aplicação das outras camadasFerramentas necessárias Java SDKDockerPostmanIde de sua preferenciaUm dos pontos essenciais de uma arquitetura de software e manter o domínio da aplicação coração da aplicação entidades e regras de negócios de uma aplicação desacoplada das outras camadas da aplicação de modo que caso tenha necessidade de uma mudança por exemplo a troca de uma base de dados x para uma base de dados y isso seja feito de uma maneira simples Estou estudando e adquirindo conhecimento nesse assunto de designers e estrutura de código mas neste artigo quero dividir o pouco que tenho aprendido sobre o assunto Vamos criar uma aplicação utilizando classes abstratas para deixar nosso domínio isolado e iremos utilizar no inicio o banco de dados Postgres como database da nossa aplicação e depois faremos a transição da nossa aplicação para o DybamoDb da AWS de uma forma simples sem ter que alterar nosso domínio Para iniciarmos crie seu projeto Spring através do site Spring Initializr conforme imagem abaixoVamos construir nossa aplicação utilizando os princípios do design pattern DDD para isso ela serádividida em packages Core Esse package e onde ficara o coração da nossa aplicação a parte de domínio e de regras de negocio que ficara isolada e independente das outras camadas de nossa aplicação Infrastructure Esse package e onde ficara a parte de configuração de nossa aplicação configuração de banco de dados e repositórios de acesso ao database nele e que vamos fazer a transição do Postgres para o dynamoDb Application Esse package e onde ficara a parte de acesso a nossa aplicação por aplicações externas neste artigo nossa aplicação seráacessada via requisição Http conforme a imagem abaixo Dentro do package Core crie um package com o nome usuario nele vamos armazenar as classes de domínio e regras de negocio referente a um usuario de nossa aplicação dentro do package usuário iremos criar as seguintes classes Usuario Nossa classe Entityimport javax persistence Entitypublic class Usuario Id GeneratedValue strategy GenerationType IDENTITY private Long userId private String name private String email private String cpf Deprecated public Usuario public Usuario String name String email String cpf this name name this email email this cpf cpf public String getUserId return userId public void setUserId String userId this userId userId public String getName return name public String getEmail return email public String getCpf return cpf public void setName String name this name name public void setEmail String email this email email public void setCpf String cpf this cpf cpf UsuarioRepository Uma interface com os métodos de acesso ao banco de dados relacionado a um Usuário import java util List import java util Optional public interface UsuarioRepository public Usuario createUser Usuario user public Usuario updateUser Usuario user public Optional lt Usuario gt findByUserId Long userId public List lt Usuario gt findAllUser public void deleteUser Usuario user UsuarioService Uma interface com os métodos que utilizaremos para atender a regra de negocio de nossa aplicação relacionada a um Usuário import com example ddd application inputDto user UsuarioForm import com example ddd application outputDto user UsuarioDto import java util List public interface UsuarioService public Usuario createUser Usuario usuario public String updateUser UsuarioForm usuarioForm Long userId public List lt UsuarioDto gt findAllUser public UsuarioDto findByUserId Long usuarioId public void deleteUser Long usuarioId UsuarioServiceImpl Nesta classe implementamos os metodos contidos na interface UsuarioService e realizamos a logica necessaria para receber e expor os dados para aplicações externas import com example ddd application inputDto user UsuarioForm import com example ddd application outputDto user UsuarioDto import org springframework beans factory annotation Autowired import org springframework stereotype Service import java util List import java util stream Collectors Servicepublic class UsuarioServiceImpl implements UsuarioService Autowired private UsuarioRepository usuarioRepository public UsuarioServiceImpl UsuarioRepository usuarioRepository this usuarioRepository usuarioRepository Override public Usuario createUser Usuario usuario return usuarioRepository createUser usuario Override public String updateUser UsuarioForm usuarioForm Long userId Usuario usuario usuarioRepository findByUserId userId orElseThrow gt new IllegalArgumentException Nao ha usuario com o id userId toString Usuario usuarioUpdate usuarioForm converte usuarioUpdate setUserId usuario getUserId usuarioRepository updateUser usuarioUpdate return atualizado Override public List lt UsuarioDto gt findAllUser return usuarioRepository findAllUser stream map it gt return new UsuarioDto it getUserId it getName it getEmail it getCpf collect Collectors toList Override public UsuarioDto findByUserId Long usuarioId Usuario usuario usuarioRepository findByUserId usuarioId orElseThrow gt new IllegalArgumentException Nao ha usuario cadastrado com o id usuarioId toString return new UsuarioDto usuario getUserId usuario getName usuario getEmail usuario getCpf Override public void deleteUser Long usuarioId Usuario usuario usuarioRepository findByUserId usuarioId orElseThrow gt new IllegalArgumentException Nao ha usuario cadastrado com o id usuarioId toString usuarioRepository deleteUser usuario Feito isso vamos agora dentro do package infrastructure criar as classes de configuração e repositórios de nossa aplicação A parte de configuração do nosso banco de dados postgres armazenaremos dentro do nosso arquivo application properties Application properties datasourcespring datasource driverClassName org postgresql Driverspring datasource url jdbc postgresql localhost testearqspring datasource username postgresspring datasource password password jpaspring jpa properties hibernate dialect org hibernate dialect PostgreSQLDialectspring jpa hibernate ddl auto update Mostrar Sql no terminalspring jpa show sql truespring jpa properties hibernate format sql trueserver error include message alwaysVamos criar agora dentro no package infrastructure de repositories e dentro desse package um package usuarioRepository que ira armazenar as classes responsáveis ao acesso do banco de dados relacionados ao domínio do Usuário UsuarioAbstractRepositoryDB Interface que nos permite a vários métodos relacionados ao banco de dados através do JPA import com example ddd core usuario Usuario import org springframework data jpa repository JpaRepository import org springframework stereotype Repository Repositorypublic interface UsuarioAbstractRepositoryDB extends JpaRepository lt Usuario Long gt UsuarioRepositoryImpl Esta classe implementa os métodos que criamos na interface UsuarioRepository e tem injetada dentro dela um UsuarioAbstractRepositoryDB para cada método implementado da interface UsuarioRepository relacionamos com o método de acesso ao banco de dados que obtemos através da injeção da classe UsuarioAbstractRepositoryDB import com example ddd core usuario Usuario import com example ddd core usuario UsuarioRepository import org springframework beans factory annotation Autowired import org springframework stereotype Component import java util List import java util Optional Componentpublic class UsuarioRepositoryImpl implements UsuarioRepository Autowired private UsuarioAbstractRepositoryDB usuarioAbstractRepositoryDB public UsuarioRepositoryImpl UsuarioAbstractRepositoryDB usuarioAbstractRepositoryDB this usuarioAbstractRepositoryDB usuarioAbstractRepositoryDB Override public Usuario createUser Usuario user return usuarioAbstractRepositoryDB save user Override public Usuario updateUser Usuario user return usuarioAbstractRepositoryDB save user Override public Optional lt Usuario gt findByUserId Long userId return usuarioAbstractRepositoryDB findById userId Override public List lt Usuario gt findAllUser return usuarioAbstractRepositoryDB findAll Override public void deleteUser Usuario user usuarioAbstractRepositoryDB delete user E aqui que desacoplamos nosso domínio da parte de configuração e acesso a banco de dados pois independente do banco de dados que utilizarmos temos uma classe que acessa nosso banco de dados e atraves da abstração de classe implementa os métodos contido em nossa interface dentro do nosso domínio veja que a interface UsuarioRepository não depende de qual banco de dados iremos utilizar para implementa la Vamos agora estruturar o acesso a nossa aplicação dentro do package application crie os packages controllers inputDto outputDto Dentro do package controllers crie o package usuarioController e dentro dela a classe UsuarioController que teráos métodos de acesso a nossa aplicação via Http UsuarioControllerimport com example ddd application inputDto user UsuarioForm import com example ddd application outputDto user UsuarioDto import com example ddd core usuario Usuario import com example ddd core usuario UsuarioService import org springframework web bind annotation import java util List RestController RequestMapping api v public class UsuarioController private UsuarioService usuarioService public UsuarioController UsuarioService usuarioService this usuarioService usuarioService PostMapping user public String createUser RequestBody UsuarioForm usuarioForm Usuario user usuarioForm converte System out println user toString usuarioService createUser user return ok GetMapping user public List lt UsuarioDto gt findAllUser return usuarioService findAllUser PutMapping user usuarioId public String updateUser RequestBody UsuarioForm usuarioForm PathVariable usuarioId Long usuarioId usuarioService updateUser usuarioForm usuarioId return atualizado GetMapping user usuarioId public UsuarioDto updateUser PathVariable usuarioId Long usuarioId return usuarioService findByUserId usuarioId DeleteMapping user usuarioId public void deleteUser PathVariable usuarioId Long usuarioId usuarioService deleteUser usuarioId Dentro do package inputDto crie um package usuario e dentro dele a classe UsuarioForm que ira mapear os dados que recebemos atraves da requisição Http e converte esses dados para nossa classe Entity UsuarioFormimport com example ddd core usuario Usuario public class UsuarioForm private String name private String email private String cpf public UsuarioForm String name String email String cpf this name name this email email this cpf cpf public Usuario converte return new Usuario name email cpf Dentro do package outputDto crie um package usuario e dentro dele a classe UsuarioDto que ira mapear os dados que iremos retornar para nossa requisição Http UsuarioDtopublic class UsuarioDto private Long id private String name private String email private String cpf public Long getId return id public String getName return name public String getEmail return email public String getCpf return cpf public UsuarioDto Long id String name String email String cpf this id id this name name this email email this cpf cpf Vamos agora rodar nossa aplicação e testa la via Postman mas para isso seránecessário subirmos nosso banco de dados Postgres na raiz de nossa aplicação crie um arquivo docker compose yml docker compose ymlversion services postgres image postgres alpine volumes postgres volume var lib postgresql data ports environment POSTGRES USER postgres POSTGRES PASSWORD passwordvolumes postgres volume Pelo cmd entre na pasta onde contem o arquivo docker compose yml e rode o seguinte comando docker compose up d Usuario Cadastrado com Sucesso Na segunda parte deste post vamos fazer a transição da nossa aplicação do Postgres para o dynamoDb para acessar e so clicar no link abaixo parte 2022-04-19 00:21:15
海外TECH DEV Community My approach building a serverless application that notifies me of gasoline prices https://dev.to/joseangel1196/my-approach-building-a-serverless-application-that-notifies-me-of-gasoline-prices-1hg8 My approach building a serverless application that notifies me of gasoline pricesAWS offers a variety of products to create any application you can think of With DynamoDB you can trigger a Lambda function to perform additional work each time a DynamoDB table is updated In this post I ll show how these two technologies can work together Without further ado let s get started What I m buildingNYC Open Data has a public API that details gasoline price information of all the New York Regions A new gasoline price gets added every week I had the idea of building a system that can notify me of the gasoline prices with the condition when the price goes down I m going to show you how I did this You might think the idea sounds a little vague or easy to do but the most important thing about the project is how I did it which is what I want to emphasize here in this blog Setting up the project Getting your repository set upI enjoy doing side projects with the latest trends in the market In the project I use terraform For those of you that don t know terraform is infrastructure as code that lets you build change and version cloud and on premise resources safely and efficiently In short words instead of using the AWS UI we use code to create AWS services Another cool technology that I m using is Serverless Serverless is a cloud native development model that allows developers to build and run applications without having to manage servers It s really cool because we just need to provide the code and AWS will do all the heavy tasks in the background Building the infrastructureSomething I have learned over time using terraform is that I like to structure the different resources I want to build using modules For example if I m planning to use an EC I normally create a compute module and allocate all the logics that falls in EC Here s what I did module dynamodb source dynamodb module sns source sns email var email module lambda source lambda gasoline prices table arn module dynamodb gasoline prices table arn gasoline price table stream arn module dynamodb dynamodb stream arn sns arn module sns sns arn Once we have the modules in place I start building each module separately and export any variable that a given module needs In AWS every resource that we want to create is private If we want to execute a resource either programmatically or get access to it we need to explicitly tell AWS to do it I created an IAM role in the lambda module to detail all the permissions that the Lambda needs resource aws iam policy iam role policy for lambda name aws iam policy for terraform aws lambda role description AWS IAM Policy for managing aws lambda role policy jsonencode Statement Action s GetObject s PutObject Effect Allow Resource aws s bucket price fetcher deployment arn Action dynamodb Scan dynamodb Query dynamodb PutItem Effect Allow Resource var gasoline prices table arn Action logs CreateLogGroup logs CreateLogStream logs PutLogEvents logs DescribeLogStreams logs createExportTask Effect Allow Resource Action dynamodb DescribeStream dynamodb GetRecords dynamodb GetShardIterator dynamodb ListStreams Effect Allow Resource var gasoline price table stream arn Action sns Publish Effect Allow Resource var sns arn Version As you can see above we have explicitly told AWS which permissions my AWS needs to execute the Lambda This is something that you have to think about as you continue adding functionalities to your Lambda If you wondered before why I was passing some variables to the lambda from the dynamodb module In order to grant permission to our Lambda to execute queries in Dynamo DB We need to get the reference of the table and explicitly add it to the policy Lambda and MoreIt only takes a few minutes to create a lambda using the serverless framework Make sure you have the serverless package installed on your machine Depending on what type of serverless template you want to create e g javascript python you specify it in the serverless CLI For examplesls create template aws python path myServiceThe serverless yml is the heart of a serverless application This file describes the entire application infrastructure all the way from the programming language to resource access A few examples of properties we can use The functions we want to runEnvironment variablesDepending on the cloud provider we re using we can specify the role and the region our code will get run onFor more information about this check out this documentation Here s what my YAML looks like service aws price fetcherframeworkVersion provider name aws runtime python region us east deploymentBucket name price fetcher serverlessdeploymentbucket iam role arn aws iam role Price Notifier Rolefunctions price fetcher handler handler price fetcher description Fetches gasoline price from public API events schedule cron WED price publisher handler handler price publisher description Publish gasoline dropsplugins serverless python requirementsI won t go to each one of the properties because some of them are self explanatory service is the name of our lambda in AWS provider region Lambas are region specific What this means is that each Lambda function lives in a specific AWS region deploymentBucket when we create a lambda our lambda has to live somewhere in AWS This is why in terraform we are creating a bucket for our lambda to live in and by this means we need to specify it in the YAML file role The role created in terraform along with its permissions to execute resources in AWS functions When we create a lambda we can have multiple functions living in one lambda To make this project easy I chose to have lambda with functions one for fetching the gasoline price from the public API and another one to publish the gasoline drops plugins are just the different libraries we are using in serverless We re using serverless python requirements because we need some libraries to execute our code for example requests If you re curious to see more libraries check out this documentation that details all the plugins serverless has In the lambda I created a function called price fetcher whose purpose is to query the DynamoDB table if there are any records it gets the most recent gasoline price calculates against the last record we have in the database if the price has dropped it insert the record to the table otherwise it doesn t do the insertion def price fetcher event Dict str Any Any gt None Fetches gasoline price from public API Calculate the most recent gasoline price with the last record saved in the DynamoDB table if the price has dropped it inserts that record into the table otherwise it skips it items query GASOLINE PRICE TABLE NAME LOG info f Got items items gasoline api response request gasoline api json gasoline api response json most recent gasoline price Dict gasoline api json LOG info f Got most recent gasoline price most recent gasoline price published at most recent gasoline price date gasoline price most recent gasoline price new york state average gal if items previous gasoline price float items newYorkStateAverageGal LOG info f Got previous previous gasoline price previous gasoline price recent gasoline price float gasoline price price has dropped recent gasoline price lt previous gasoline price if not price has dropped LOG info Skipping insertion because price hasn t dropped return response insert GASOLINE PRICE TABLE NAME published at published at gasoline price gasoline price LOG info f Got response response return NoneDynamoDB provides a Change Data Capture CDC mechanism for each table That means if someone creates a new entry or modifies an item in a table DynamoDB immediately emits an event containing the information about the change You can build applications that consume these events and take action based on the contents DynamoDB keeps track of every modification to data items in a table and streams them as real time events Here s how I did it using terraform resource aws lambda event source mapping gasoline prices stream event source arn aws dynamodb table gasoline prices table stream arn function name var price publisher arn starting position LATEST We need to provide a unique ARN that points to our table and indicates the function where we want to send these events Next see how I m getting the events from the Lambda def price publisher event Dict str Any Any gt None Get DynamoDB events and send information to the user LOG info f Got event event record event Records most recent gasoline price record dynamodb NewImage newYorkStateAverageGal S message f Gasoline price most recent gasoline price have fell subject A gasoline price dropped has been detected send sns message subject def send sns message subject client boto client sns client publish TopicArn SNS ARN Message message Subject subject Lastly we use AWS Simple Notification Service or AWS SNS a cloud based web service that delivers messages In SNS we have a publisher and a subscriber The publisher sends out a message to the subscriber immediately instead of storing the message The subscriber s an entity that receives the messages to the topics that they have subscribed to In my case I m using my email to receive the notifications Here s the final result when I receive the mail from SNS Summary and where to next This was a really interesting project that taught me two important things I won t forget It taught me how permissions really work on AWS They can be confusing sometimes Do I need a role for this project What policy do I need to run this action What users groups and roles really are and their differences These and other questions were the ones I was able to answer during this project After learning how to spin up a Lambda using the Serverless framework and reading records with DynamoDB streams it s my turn to keep digging more into these great technologies to continue creating more projects like this If you want to send me feedback or just want to connect with me let me know via Twitter or LinkedIn Also if you are curious to see the entire project check it out on my Github Till the next one stay safe and keep learning 2022-04-19 00:19:08
海外TECH DEV Community dev log 02 https://dev.to/heyoitsjuice/dev-log-02-2cdl dev log Aside from some personal things I needed to take care of I ended up taking a much needed week off to recover mentally and physically after putting a lot of effort and work on pushing out some new personal projects as well as my personal portfolio website which I ll go a bit more in depth below Despite being only really I realize I m not as young as I used to be and pulling any form of an all nighter with lack of decent sleep to recover makes me feel absolutely horrid and groggy However it just goes to show that dedicating an allocated amount of focused time on a dedicated task will show dividends in the end when you finally end up finishing it As a bit of a recap I have set myself out to essentially strengthen my resume The ways I have sought out to do so were by revamping older projects that I had left unfinished some time ago and also adding some new more refined projects I would showcase these projects on a personal portfolio website that I had previously started work on and add links amp demos to all of this on my resume To start it all off ForecastForecast is the first project that I decided to tackle on my newly taken path I did a bit of a write up on Forecast in dev log if you would like to read up on that But a brief run down of Forecast is that it s a weather forecast web application that pulls in the Day Hour forecast data from OpenWeatherMap s API and showcases it in a card responsive grid Each card indicates the date a description of the weather an svg icon relative to the description of the weather and the high and low temp The first card will always be today s date Here s the github repo And here s a pushed demo What were my take aways from this Skimming and rummaging through old code I have written is both hard and enlightening Pushing web applications as a working demo seemed incredibly daunting at first but after going through the motions it ended up being incredibly easy to do so at least it did with vercel ChelloChello is the second project I decided to tackle Just like Forecast Chello is an older to do project that I decided I wanted to revamp Based on inspiration from Atlassian s agile workflow applications like Jira and Trello Chello is a rudimentary kanban to do list utilizing Atlassian s very own drag and drop libraryWith wanting to try out and learn different technologies on the front end I decided to also utilize a combination of Next js and Chakra UI to build out the UI of this web application Here s the github repo And here s a pushed demo What were my take aways from this There was a lot of complexity in working with a third party library like react beautiful dnd and having to spend an ample amount of time to screen through the repo documentation and do a bunch of google searches was no question Front end is hard yet fun The main problem I needed to tackle was making the entirety of the to do list mobile responsive FuegoFuego is a project I initially did not think about doing but ended up completing anyways To adhere to this idea of utilizing new technologies I decided to not use Next js and Chakra UI this project even though I really wanted to Fuego is an open chat platform that s very similar to Youtube s very own superchat platform shown on their livestreams React and TailwindCSS were used to create the UI and Firebase was used to host back end functionality I came to the realization after finishing Forecast and Chello that I needed to work on a project that spanned across both stacks Chello was mainly a front end based application Forecast did a little better through utilizing an API but it didn t really encapsulate the database portion of back end Having a full stack application would bring more diversity to my projects and I thought a chat app was the simplest solution I could build Using my prior knowledge on Firebase that I learned in my workplace I decided to utilize Firebase s Cloud Firestore as my noSQL database option to host and render user messages in real time To have registered users on the platform I decided to make use of Firebase s user authentication specifically Google Authentication for easy plug and play UX flow Here s the github repo And here s a pushed demo What were my take aways Firebase is very streamlined but at the same time comes with it s own set of problems in terms of usable code based on the version TailwindCSS is such a blast to use compared to vanilla CSS If you re a whiz at CSS then TailwindCSS streamlines the process of implementing design into your application I should have just utilized Typescript from the beginning since I ended up realizing that I needed to define PropTypes for chat UI anyways Portfolio WebsiteI ve had a few attempts where I created a base foundation for a personal portfolio website from scratch but I would always end up scrapping it after awhile whether it be due to lost of motivation responsive issues tech stack regret etc As a result of this I decided to approach this in a different method by utilizing an already made template The idea around this is that I shouldn t really re invent the wheel After going through a number of how to create an x y z website tutorial I ended up choosing craftzdog s website as my template I really liked the look and the flow of his website and decided to roll with putting my own spin on it The inspiration to utilize Chakra UI and Next js for Forecast and Chello actually came from this portfolio website tutorial so I have to attribute my own learning of those technologies to Takuya Matsuyama I redesigned the landing page of the portfolio website and even went on to learn how to use Three js and make my own D voxel to put based on how much I liked his implementation of it A brief rundown of how I learned how to make a D voxel Lots of youtube videosMagicaVoxel Blender vox import and converter for BlenderAside from the D voxel I decided to keep the UI and UX flow of the Work and Post pages basically what s not broke doesn t need to be fix I also added a contact page which I m currently working out the kinks for Go ahead and checkout the website over here Overall TakewayThere s still a lot of implementations and upgrades I can do on these projects Adding test cases through a testing library like jest or cypress is one thing I can do There s a bug that occurs on my project Chello that causes the web app to crash after a few card drags into a newly added field called In Progress that I want to address Implementing a database to cache created tasks on Chello is something that will level up the project for sure Not sure if I would need a form of user auth to do this or if I can just do it straight out of the box The current card implementation on Forecast doesn t really give meaningful high and low temps on days that are not today s date Not sure why the data for the highs and lows are like that for future dates on the OpenWeatherMap JSON Fuego is the the most complete project out of the three but I m actually unsure about how scalable the chat app is which is something I could possibly address via Firebase s database rules I need to figure out a seamless way to implement a contact form for my portfolio website I have the UI complete but the actually backend that deals with managing emailing needs to be researched and implemented If you ve come this far thanks for taking the time to read through all of this It s been pretty nice change of pace to be able to document my works and I hope to get better at doing so with more complicated projects in the future 2022-04-19 00:08:41
海外TECH DEV Community My "Artisinal" Ingress https://dev.to/nabsul/my-artisinal-ingress-28me My quot Artisinal quot IngressOriginal Post SummaryI built a replacement for nginx and cert manager in my Kubernetes cluster It leverages NATS and CockroachDB and is written in NET Core C It s simple easy to setup and easy to understand It features a web interface for management and configuration It s also horizontally scalable out of the box and aims to follow all the best practices for high availability and observability Finally it s pre alpha at the moment and I m not ready to open source the project However I m looking for like minded people who might be interested in turning this into something more broadly useful BackgroundFor the past year or so I ve been working on replacing cert manager in my Kuberentes cluster It started with a cert manager outage due to a DNS bug and by learning how to manually manage certificates I then automated all of that with KCert When I got KCert done I realized there was another part of my setup that could be improved the NGINX Ingress controller So I decided to continue the effort and replace that as well And that is how I created My Artisinal Ingress I call it artisinal because I built it to my own personal taste So far I m pleased with the result I m using it in my personal Kubernetes cluster which is serving the page you are reading right now Design DecisionsWhen I decided to build a replacement for NGINX Ingress Controller I came up with several goals Simple SetupI m not a fan of Helm or CRDs more accurately I love the idea of CRDs but I think they re often used unnecessarily They are frequently used to create overly complex systems and make it extremly difficult to debug when things goes wrong Sometimes your ownly option is to delete the whole cluster and start again For example take a look at the cert manager and NGINX Ingress Controller installation The installation of cert manager requires lines of yamlcert manager runs three pods in the cluster Is cert management really that complex NGINX Ingress controller can be installed via Helm or almost lines of yamlIs all this necessary What if something goes wrong Will you know how to debug and fix any of this No State in KubernetesNew versions of Kubernetes are released quite frequently The easiest way for me to stay up to date is to create a brand new cluster move all my services there and destroy the old one This requires copying everything over from the old cluster to the new one While my deployement and service definitions are checked into a git repository secrets and certificates are not Those objects need to be manually copied over For this reason I decided to eliminate the need to copy certificates and ingress configurations I decided to store the state of my ingress controller in a central CockroachDB store This really could have been anything S Azure Key Vault etc But the main idea is to store all of this information outside of the Kubeneretes cluster This approach has two advantages I don t have to copy Kubernetes certificates from one cluster to anotherI can deploy multiple Kubernetes clusters that rely on the same source of truth Must be Easy to Scale HorizontallyMy first ingress controller in Kubernetes was Traefik and I was happy with it for a long time Then I discovered that it doesn t support multiple instances what they called high availability Certificates were stored on the local disk and couldn t be shared across multiple instances of the service The paid version of Traefik did not have this limitation and that did not sit well with me I even tried to fix that myself and eventually gave up and moved to NGINX For this reason I set out from the start to design my ingress controller to scale seamlessly Using CockroachDB as my data store is the first part of solving this but there is also the problem of keeping all nodes synchronized when things change I decided to leverage NATS for this purpose Using NATS made it easy for all instances of the service to stay synchronized and exchange messages Built in Certificate ManagementI thought about using KCerttogether with this new system but decided against it It feels like they should be two separate systems but especially with ACME HTTP challenges it becomes difficult to cleanly separate the two The other issue is that KCert is specifically geared towards working with Kubernetes ingressese and certificates However I had decided that I want to store that information outside of Kubernetes for this project I therefore couldn t use KCert without decoupling it completely from Kubernetes and making it much more complex I therefore decided to build certificate management directly into my new controller This wasn t too much work since I could reuse the code I wrote in KCert Good Observability PracticesI wanted to make sure that the system is easy to debug monitor and maintain For the monitoring piece I tried Azure s Application Insights Datadog and Honeycomb All of these options are great but I m sure there are other great options out there Pulling in all those client libraries doesn t feel right I m therefore leaning towards a more generic approach I will use Open Telemetry which is the standard the industry is converging to Most monitoring systems support Open Telemetry either natively or through side car shims Other ConsiderationsIf I were optimizing for broad community adoption I would have written this in Go or Rust However I really enjoy writing in C and I can practice Go and Rust at work For this reason I decided to go with NET Core C and used YARP Additionally I ve been looking for an excuse to learn and use both CockroachDB and NATS I use CockrochDB s cloud service as my data store and NATS to keep my load balancer instances synchronized Where s the Code The project is currently private and I m probably not going to open source it any time soon I expect that I will open source it at some point but for now I want to have the freedom to make drastic design changes Open sourcing it would leave me worried about affecting anyone using the code I would however love to collaborate on this idea if there is interest If you are interested in seeing the code and helping turn it into a usable open source project please reach out The easiest ways to contact me are LinkedIn and Twitter 2022-04-19 00:07:42
Apple AppleInsider - Frontpage News Apple Maps adds biking directions to US Midwestern locations https://appleinsider.com/articles/22/04/19/apple-maps-adds-biking-directions-to-us-midwestern-locations?utm_medium=rss Apple Maps adds biking directions to US Midwestern locationsApple has quietly rolled out Apple Maps cycling directions for parts of the Midwest including major cities such as Chicago Detroit and Columbus Introduced with iOS cycling directions provide users with a wealth of information for their coming bike ride Navigation assets include designated bike lanes paths inclines stairs and obstacles Apple Maps enthusiast Justin O Beirne has highlighted the update in a post on his blog Cities added in the update include Read more 2022-04-19 00:22:09
Apple AppleInsider - Frontpage News Compared: Apple Studio Display versus Porsche Design AOC Agon Pro monitor https://appleinsider.com/articles/22/04/17/compared-apple-studio-display-versus-porsche-design-aoc-agon-pro-monitor?utm_medium=rss Compared Apple Studio Display versus Porsche Design AOC Agon Pro monitorPorsche Design s AOC AGON Pro PDM is in the same general price bracket as the Apple Studio Display but each monitor offers varying benefits to well heeled users wanting a premium experience Porsche Design left Apple Studio Monitor right When Apple introduced the Studio Display it was seen as a more wallet friendly alternative to the Pro Display XDR While cheaper it is still considered a premium monitor option to use with Apple s lineup Read more 2022-04-19 00:00:38
海外TECH Engadget Jason Momoa in negotiations to star in ‘Minecraft’ movie https://www.engadget.com/jason-momoa-in-negotiations-to-star-in-minecraft-movie-003239221.html?src=rss Jason Momoa in negotiations to star in Minecraft movieA movie version of Mojang Studio s Minecraft is starting to come together Action hero veteran Jason Momoa is in talks to star in an upcoming film adaptation of the popular worldbuilding game reportedThe Hollywood Reporter While no contract has been signed yet the possible addition of Momoa is an encouraging sign of life for a film that has been on Warner Bros backburner Warner Bros originally planned to release the film in March but it was shelved due to production delays related to the pandemic according to THR The film s troubles pre date Covid its original director and screenwriters quit the movie in due to creative differences with Mojang Napoleon Dynamite s Jared Hess has now reportedly signed on to direct the film and Dune producers Mary Parent and Roy Lee are also on board It s unclear what role Momoa will play in the film as it s still unknown what elements of the game will appear in the film and whether we ll see fan favorites like Minecraft Steve The film s storyline released by Mojang Studios in is pretty straightforward “The malevolent Ender Dragon sets out on a path of destruction prompting a young girl and her group of unlikely adventurers to set out to save the Overworld But fans should expect more movement on the film in the near future The Anklerreported that Warner Bros lease on the rights to Minecraft expires in January so production on the film will need to start before then 2022-04-19 00:32:39
海外科学 NYT > Science Scientists Question Data Behind an Experimental Alzheimer’s Drug https://www.nytimes.com/2022/04/18/health/alzheimers-cassava-simufilam.html journals 2022-04-19 00:48:52
医療系 内科開業医のお勉強日記 COVID-19入院成人への覚醒時腹臥位呼吸療法の評価:有害性が上回る可能性 ・・・ 猛省の時 https://kaigyoi.blogspot.com/2022/04/covid-19_19.html nbsp【結論と意義】この非ランダム化対照試験では機械的換気を受けていないCOVIDによる低酸素血症の患者において腹臥位呼吸療法は臨床的に有益であるとは観察されなかったさらに、覚醒下腹臥位療法を受けるよう推奨された患者において、試験日目の臨床転帰が悪化したことを示す実質的な証拠があり、潜在的な有害性が示唆された。 2022-04-19 00:16:00
ニュース BBC News - Home Ulcerative colitis: 'I was going to the toilet up to 30 times a day' https://www.bbc.co.uk/news/uk-england-essex-60251156?at_medium=RSS&at_campaign=KARANGA stoma 2022-04-19 00:48:58
ビジネス ダイヤモンド・オンライン - 新着記事 ロシア軍、東部で攻勢強める=ウクライナ大統領 - WSJ発 https://diamond.jp/articles/-/301908 東部 2022-04-19 09:22:00
ビジネス ダイヤモンド・オンライン - 新着記事 SNS投稿を医学研究に活用、患者の声がデータに - WSJ発 https://diamond.jp/articles/-/301909 研究 2022-04-19 09:14:00
北海道 北海道新聞 米、中国の軍事拠点化を懸念 ソロモン安保協定、阻止へ https://www.hokkaido-np.co.jp/article/671228/ 記者会見 2022-04-19 09:26:00
北海道 北海道新聞 ビール醸造の夢、ニセコで実現 移住の夫妻「ごくごく飲んで」 今夏にも完成 https://www.hokkaido-np.co.jp/article/671091/ 醸造所 2022-04-19 09:18:03
北海道 北海道新聞 マスク氏「役員の報酬ゼロに」 ツイッターへの対抗姿勢強める https://www.hokkaido-np.co.jp/article/671224/ 電気 2022-04-19 09:14:00
北海道 北海道新聞 茨城北部で震度5弱 津波の心配なし https://www.hokkaido-np.co.jp/article/671223/ 津波の心配 2022-04-19 09:09:00
ビジネス 東洋経済オンライン 「性格悪いと受験落ちる」2浪東大生が断言する訳 いくら勉強をしても成績が上がらない根本原因 | 生まれつきの才能は不要 東大「逆転合格」の作法 | 東洋経済オンライン https://toyokeizai.net/articles/-/582741?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2022-04-19 10:00:00
ビジネス プレジデントオンライン 資源も何もないから無税天国にするしかない…アメリカが「自由の国」となった理由は"税金"にあった - だからイギリスは渋々、「自由経済の場所」とした https://president.jp/articles/-/56758 国税調査官 2022-04-19 10:00:00
ビジネス プレジデントオンライン 「成功しているIT経営者は社会不適合者が多い説」を、ひろゆきとけんすうで徹底的に話し合った - ひろゆきの第一印象は「看護師さんに謝っている大人」 https://president.jp/articles/-/56671 第一印象 2022-04-19 10:00:00
マーケティング AdverTimes 顧客基点のDX 実現するのはCMOとCIOの連携にあり! https://www.advertimes.com/20220419/article381948/ 2022-04-19 01:00:20
マーケティング AdverTimes 「補足の比喩でも許しがたい」 吉野家、常務の不適切発言巡り https://www.advertimes.com/20220419/article382041/ 不適切発言 2022-04-19 00:21:53

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)